mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
update settings and docs
This commit is contained in:
1 parent
645cfacecb
commit
dd769a9aa5
4 files changed
+13
-13
No files matched your search
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { Markdown } from "../../../../../components/Markdown";
|
||||
import { PageWrapper } from "../../../../../components/PageWrapper";
|
||||
import { Markdown } from "../../../../../../components/Markdown";
|
||||
import { PageWrapper } from "../../../../../../components/PageWrapper";
|
||||
|
||||
interface PageProps {
|
||||
content: string;
|
||||
|
||||
+5
-5
@@ -2,14 +2,14 @@
|
||||
import { AstroSeo } from "@astrolib/seo";
|
||||
import type { GetStaticPaths } from "astro";
|
||||
import { readFile } from "fs/promises";
|
||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
||||
import BaseLayout from "../../../../../../layouts/BaseLayout.astro";
|
||||
import { getStaticPaths as parentGetStaticPaths } from "../../../index.astro";
|
||||
import { Page } from "./_index";
|
||||
|
||||
export const getStaticPaths = (async () => {
|
||||
const parentPaths = parentGetStaticPaths();
|
||||
const ROOT = "../../../../../../../../docs/";
|
||||
const files = import.meta.glob("../../../../../../../../docs/**/*.md", {
|
||||
const ROOT = "../../../../../../../../../docs/";
|
||||
const files = import.meta.glob("../../../../../../../../../docs/**/*.md", {
|
||||
eager: true,
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@ export const getStaticPaths = (async () => {
|
||||
const couple = file.replace(ROOT, "").split("/");
|
||||
couple[1] = couple[1].replace(".md", "");
|
||||
const content = await readFile(
|
||||
`../../docs/${couple[0]}/${couple[1]}.md`
|
||||
`../../docs/${couple[0]}/${couple[1]}.md`,
|
||||
).then((buffer) => buffer.toString());
|
||||
|
||||
return parentPaths.map((parent) => ({
|
||||
@@ -30,7 +30,7 @@ export const getStaticPaths = (async () => {
|
||||
},
|
||||
props: { ...parent.props, content },
|
||||
}));
|
||||
})
|
||||
}),
|
||||
)
|
||||
).flat();
|
||||
}) satisfies GetStaticPaths;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Flex, Switch, Text } from "@radix-ui/themes";
|
||||
import { LocaleSwitcher } from "../../../components/LocaleSwitcher";
|
||||
import { PageWrapper } from "../../../components/PageWrapper";
|
||||
import { LocaleSwitcher } from "../../../../components/LocaleSwitcher";
|
||||
import { PageWrapper } from "../../../../components/PageWrapper";
|
||||
import {
|
||||
LocaleProvider,
|
||||
useLocale,
|
||||
type LocaleAcceptorProps,
|
||||
} from "../../../hooks/useLocale";
|
||||
import { App } from "../../../stores/app";
|
||||
} from "../../../../hooks/useLocale";
|
||||
import { App } from "../../../../stores/app";
|
||||
|
||||
export function Page({ locale }: LocaleAcceptorProps) {
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import { AstroSeo } from "@astrolib/seo";
|
||||
import { getStrings } from "../../../core/i18n/getStrings";
|
||||
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
||||
import { getStrings } from "../../../../core/i18n/getStrings";
|
||||
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||
import { Page } from "./_index";
|
||||
|
||||
export { getStaticPaths } from "../index.astro";
|
||||
|
||||
Reference in new issue
Block a user