From 02f28202d19338affb1de522352749ddc2c45cc4 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Tue, 13 May 2025 20:56:31 -0700 Subject: [PATCH] rename and reorganize guide pages --- .../navigation/sidebars/nav/RootNav.astro | 5 +++-- src/content.config.ts | 1 + src/guide/index.mdx | 15 ++------------- .../{getting-started.mdx => install-setup.mdx} | 3 ++- src/guide/{intro.mdx => introduction.mdx} | 1 + src/guide/positioning.mdx | 1 + src/guide/{qml-overview.mdx => qml-language.mdx} | 3 ++- src/pages/docs/index.astro | 2 +- src/pages/index.astro | 2 +- 9 files changed, 14 insertions(+), 19 deletions(-) rename src/guide/{getting-started.mdx => install-setup.mdx} (99%) rename src/guide/{intro.mdx => introduction.mdx} (99%) rename src/guide/{qml-overview.mdx => qml-language.mdx} (99%) diff --git a/src/components/navigation/sidebars/nav/RootNav.astro b/src/components/navigation/sidebars/nav/RootNav.astro index 03bdc85..95330d8 100644 --- a/src/components/navigation/sidebars/nav/RootNav.astro +++ b/src/components/navigation/sidebars/nav/RootNav.astro @@ -21,7 +21,8 @@ const guidePages = await getCollection("guide"); function genGuideNav(base: string): TreeEntry[] | undefined { const pages = guidePages - .filter(page => page.id.match(`^${base}[^/]*$`) !== null) + .filter(page => page.id.match(`^${base}[^/]*$`) !== null && page.id != "index") + .sort((a, b) => a.data.index - b.data.index) .map(page => ({ title: page.data.title, link: `/docs/guide/${page.id}`, @@ -33,7 +34,7 @@ function genGuideNav(base: string): TreeEntry[] | undefined { } const guide = { - title: "Guide", + title: "Usage Guide", link: "/docs/guide", current: currentRoute.startsWith("guide"), entries: genGuideNav(""), diff --git a/src/content.config.ts b/src/content.config.ts index 903a7a0..6747c66 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -5,6 +5,7 @@ const guide = defineCollection({ loader: glob({ pattern: "**/*", base: "src/guide" }), schema: z.object({ title: z.string(), + index: z.number(), }), }); diff --git a/src/guide/index.mdx b/src/guide/index.mdx index 9ca06fd..fd95fd9 100644 --- a/src/guide/index.mdx +++ b/src/guide/index.mdx @@ -1,17 +1,6 @@ --- -title: "Configuration" +title: "Usage Guide" description: "Configuring the shell" +index: -1 --- # {frontmatter.title} - -See [Getting Started](/docs/configuration/getting-started) for installation and editor configuration instructions. - -You should start with the [Introduction](/docs/configuration/intro) which will guide you -through the basics of QML by creating a simple topbar with a clock. - -From there you can read the [QML Overview](/docs/configuration/qml-overview) to get an overview of -the QML language, or jump right into the [Type Reference](/docs/types) to find -types you can use in your shell. - -The [quickshell-examples](https://git.outfoxxed.me/quickshell/quickshell-examples) repo contains -fully working example configurations you can read and modify. diff --git a/src/guide/getting-started.mdx b/src/guide/install-setup.mdx similarity index 99% rename from src/guide/getting-started.mdx rename to src/guide/install-setup.mdx index 72a025f..e9a4f84 100644 --- a/src/guide/getting-started.mdx +++ b/src/guide/install-setup.mdx @@ -1,5 +1,6 @@ --- -title: "Getting Started" +title: "Installation & Setup" +index: 0 --- # {frontmatter.title} > [!NOTE] diff --git a/src/guide/intro.mdx b/src/guide/introduction.mdx similarity index 99% rename from src/guide/intro.mdx rename to src/guide/introduction.mdx index e6a98fa..5523605 100644 --- a/src/guide/intro.mdx +++ b/src/guide/introduction.mdx @@ -1,5 +1,6 @@ --- title: "Introduction" +index: 2 --- import Collapsible from "@components/Collapsible.astro"; diff --git a/src/guide/positioning.mdx b/src/guide/positioning.mdx index 7d7f442..9410b7f 100644 --- a/src/guide/positioning.mdx +++ b/src/guide/positioning.mdx @@ -1,5 +1,6 @@ --- title: "Positioning" +index: 2 --- import MD_Title from "@components/MD_Title.tsx" diff --git a/src/guide/qml-overview.mdx b/src/guide/qml-language.mdx similarity index 99% rename from src/guide/qml-overview.mdx rename to src/guide/qml-language.mdx index 3073747..b9e0543 100644 --- a/src/guide/qml-overview.mdx +++ b/src/guide/qml-language.mdx @@ -1,5 +1,6 @@ --- -title: "QML Overview" +title: "QML Language" +index: 10 --- import MD_Title from "@components/MD_Title.tsx" import Collapsible from "@components/Collapsible.astro"; diff --git a/src/pages/docs/index.astro b/src/pages/docs/index.astro index a06d54a..0e1e015 100644 --- a/src/pages/docs/index.astro +++ b/src/pages/docs/index.astro @@ -4,7 +4,7 @@ import DocsLayout from "@layouts/DocsLayout.astro";

Docs

diff --git a/src/pages/index.astro b/src/pages/index.astro index 638c3de..4380f47 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -15,7 +15,7 @@ const title = "Quickshell";