diff --git a/src/components/navigation/sidebars/types.d.ts b/src/components/navigation/sidebars/types.d.ts
index 8e2cbb1..111e512 100644
--- a/src/components/navigation/sidebars/types.d.ts
+++ b/src/components/navigation/sidebars/types.d.ts
@@ -17,6 +17,7 @@ export interface TreeProps {
// Right
export interface TOCProps {
+ title?: string;
config?: ConfigHeading[];
type?: TypeTableProps;
mobile: boolean;
diff --git a/src/config/io/helpers.ts b/src/config/io/helpers.ts
index a77f629..be075c3 100644
--- a/src/config/io/helpers.ts
+++ b/src/config/io/helpers.ts
@@ -28,9 +28,16 @@ export function buildHierarchy(headings: ConfigHeading[]) {
if (heading.depth === 1) {
toc.push(heading);
} else {
- parentHeadings
- .get(heading.depth - 1)
- .subheadings.push(heading);
+ let depth = heading.depth - 1;
+ let parent = null;
+
+ while (!parent && depth != 0) {
+ parent = parentHeadings.get(depth);
+ depth -= 1;
+ }
+
+ if (parent) parent.subheadings.push(heading);
+ else toc.push(heading);
}
}
return toc;
diff --git a/src/guide/faq.mdx b/src/guide/faq.mdx
index 58f88f9..015737f 100644
--- a/src/guide/faq.mdx
+++ b/src/guide/faq.mdx
@@ -3,8 +3,6 @@ title: "FAQ"
description: "Frequently Asked Questions"
index: 1000
---
-# {frontmatter.title}
-
This page is being actively expanded as common questions come up again.
Make sure to also read the [Item Size and Position](/docs/guide/size-position) and
diff --git a/src/guide/index.mdx b/src/guide/index.mdx
index da09868..1cfb205 100644
--- a/src/guide/index.mdx
+++ b/src/guide/index.mdx
@@ -3,8 +3,6 @@ title: "Usage Guide"
description: "Configuring the shell"
index: -1
---
-# {frontmatter.title}
-
See the [Installation and Setup](/docs/guide/install-setup) page to get started.
To write a Quickshell config, start by following the
diff --git a/src/guide/install-setup.mdx b/src/guide/install-setup.mdx
index 444c82b..430e490 100644
--- a/src/guide/install-setup.mdx
+++ b/src/guide/install-setup.mdx
@@ -2,7 +2,6 @@
title: "Installation & Setup"
index: 0
---
-# {frontmatter.title}
> [!NOTE]
> Quickshell is still in a somewhat early stage of development.
> There will be breaking changes before 1.0, however a migration guide will be provided.
diff --git a/src/guide/introduction.mdx b/src/guide/introduction.mdx
index b7bc674..3033da1 100644
--- a/src/guide/introduction.mdx
+++ b/src/guide/introduction.mdx
@@ -2,9 +2,6 @@
title: "Introduction"
index: 2
---
-
-# {frontmatter.title}
-
This page will walk you through the process of creating a simple bar/panel, and
introduce you to all the basic concepts involved. You can use the
[QML Language Reference](/docs/guide/qml-language) to learn about the syntax
diff --git a/src/guide/qml-language.mdx b/src/guide/qml-language.mdx
index 8bec9fb..71593d2 100644
--- a/src/guide/qml-language.mdx
+++ b/src/guide/qml-language.mdx
@@ -4,8 +4,6 @@ index: 10
---
import Collapsible from "@components/Collapsible.astro";
-# {frontmatter.title}
-
Quickshell is configured using the Qt Modeling Language, or QML.
This page explains what you need to know about QML to start using quickshell.
diff --git a/src/guide/size-position.mdx b/src/guide/size-position.mdx
index fd7a1e9..1834d1b 100644
--- a/src/guide/size-position.mdx
+++ b/src/guide/size-position.mdx
@@ -2,8 +2,6 @@
title: "Item Size and Position"
index: 2
---
-# {frontmatter.title}
-
> [!TIP]
> Read the entire page, understanding this is critical to building a well designed shell.
diff --git a/src/layouts/DocsLayout.astro b/src/layouts/DocsLayout.astro
index d35c255..ebce18d 100644
--- a/src/layouts/DocsLayout.astro
+++ b/src/layouts/DocsLayout.astro
@@ -59,7 +59,7 @@ if (url[2]) {
-
+