mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +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 { Markdown } from "../../../../../../components/Markdown";
|
||||||
import { PageWrapper } from "../../../../../components/PageWrapper";
|
import { PageWrapper } from "../../../../../../components/PageWrapper";
|
||||||
|
|
||||||
interface PageProps {
|
interface PageProps {
|
||||||
content: string;
|
content: string;
|
||||||
|
|||||||
+5
-5
@@ -2,14 +2,14 @@
|
|||||||
import { AstroSeo } from "@astrolib/seo";
|
import { AstroSeo } from "@astrolib/seo";
|
||||||
import type { GetStaticPaths } from "astro";
|
import type { GetStaticPaths } from "astro";
|
||||||
import { readFile } from "fs/promises";
|
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 { getStaticPaths as parentGetStaticPaths } from "../../../index.astro";
|
||||||
import { Page } from "./_index";
|
import { Page } from "./_index";
|
||||||
|
|
||||||
export const getStaticPaths = (async () => {
|
export const getStaticPaths = (async () => {
|
||||||
const parentPaths = parentGetStaticPaths();
|
const parentPaths = parentGetStaticPaths();
|
||||||
const ROOT = "../../../../../../../../docs/";
|
const ROOT = "../../../../../../../../../docs/";
|
||||||
const files = import.meta.glob("../../../../../../../../docs/**/*.md", {
|
const files = import.meta.glob("../../../../../../../../../docs/**/*.md", {
|
||||||
eager: true,
|
eager: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ export const getStaticPaths = (async () => {
|
|||||||
const couple = file.replace(ROOT, "").split("/");
|
const couple = file.replace(ROOT, "").split("/");
|
||||||
couple[1] = couple[1].replace(".md", "");
|
couple[1] = couple[1].replace(".md", "");
|
||||||
const content = await readFile(
|
const content = await readFile(
|
||||||
`../../docs/${couple[0]}/${couple[1]}.md`
|
`../../docs/${couple[0]}/${couple[1]}.md`,
|
||||||
).then((buffer) => buffer.toString());
|
).then((buffer) => buffer.toString());
|
||||||
|
|
||||||
return parentPaths.map((parent) => ({
|
return parentPaths.map((parent) => ({
|
||||||
@@ -30,7 +30,7 @@ export const getStaticPaths = (async () => {
|
|||||||
},
|
},
|
||||||
props: { ...parent.props, content },
|
props: { ...parent.props, content },
|
||||||
}));
|
}));
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
).flat();
|
).flat();
|
||||||
}) satisfies GetStaticPaths;
|
}) satisfies GetStaticPaths;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { Flex, Switch, Text } from "@radix-ui/themes";
|
import { Flex, Switch, Text } from "@radix-ui/themes";
|
||||||
import { LocaleSwitcher } from "../../../components/LocaleSwitcher";
|
import { LocaleSwitcher } from "../../../../components/LocaleSwitcher";
|
||||||
import { PageWrapper } from "../../../components/PageWrapper";
|
import { PageWrapper } from "../../../../components/PageWrapper";
|
||||||
import {
|
import {
|
||||||
LocaleProvider,
|
LocaleProvider,
|
||||||
useLocale,
|
useLocale,
|
||||||
type LocaleAcceptorProps,
|
type LocaleAcceptorProps,
|
||||||
} from "../../../hooks/useLocale";
|
} from "../../../../hooks/useLocale";
|
||||||
import { App } from "../../../stores/app";
|
import { App } from "../../../../stores/app";
|
||||||
|
|
||||||
export function Page({ locale }: LocaleAcceptorProps) {
|
export function Page({ locale }: LocaleAcceptorProps) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { AstroSeo } from "@astrolib/seo";
|
import { AstroSeo } from "@astrolib/seo";
|
||||||
import { getStrings } from "../../../core/i18n/getStrings";
|
import { getStrings } from "../../../../core/i18n/getStrings";
|
||||||
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||||
import { Page } from "./_index";
|
import { Page } from "./_index";
|
||||||
|
|
||||||
export { getStaticPaths } from "../index.astro";
|
export { getStaticPaths } from "../index.astro";
|
||||||
|
|||||||
Reference in new issue
Block a user