diff --git a/src/components/ContentTOC.astro b/src/components/ContentTOC.astro
new file mode 100644
index 0000000..70b6fee
--- /dev/null
+++ b/src/components/ContentTOC.astro
@@ -0,0 +1,21 @@
+---
+import { getCollection } from "astro:content";
+
+const { sectionName } = Astro.props;
+
+const entries = (await getCollection(sectionName)).sort((a, b) =>
+ a.data.title.localeCompare(b.data.title),
+);
+
+const articles = entries.filter((entry) => entry.id !== "index");
+---
+
+
diff --git a/src/components/TOC.astro b/src/components/TOC.astro
new file mode 100644
index 0000000..df77f8c
--- /dev/null
+++ b/src/components/TOC.astro
@@ -0,0 +1,49 @@
+---
+import { getCollection } from "astro:content";
+import { collectionNames } from "../config/content";
+
+const sections = await Promise.all(
+ collectionNames.map(async (name) => {
+ const entries = (await getCollection(name)).sort((a, b) =>
+ a.data.title.localeCompare(b.data.title),
+ );
+
+ const indexEntry = entries.find((entry) => entry.id === "index");
+ const articles = entries.filter((entry) => entry.id !== "index");
+
+ return {
+ name,
+ indexEntry,
+ articles,
+ };
+ }),
+);
+---
+
+
+ {
+ sections.map((section) => (
+ -
+ {section.indexEntry ? (
+
+ {section.indexEntry.data.title}
+
+ ) : (
+ section.name
+ )}
+
+ {section.articles.length > 0 && (
+
+ )}
+
+ ))
+ }
+
diff --git a/src/content/website/index.mdx b/src/content/website/index.mdx
index 6791d06..a629166 100644
--- a/src/content/website/index.mdx
+++ b/src/content/website/index.mdx
@@ -2,9 +2,14 @@
title: Website
description: Learn about the Radium website
---
-# Website
+import ContentTOC from '../../components/ContentTOC.astro';
+
The Radium website is the central hub for all things Radium. It includes the following sections:
- [Home](https://radium.live/): The main landing page for Radium, where you can learn about the project and its features.
- [Documentation](https://docs.radium.live/): The official documentation for Radium, which includes guides, API references, and tutorials.
- [Community Forum](https://forum.radium.live/): A place to ask questions, share ideas, and connect with other Radium users.
-- [Blog](https://blog.radium.live/): A collection of articles and updates about Radium, including release notes, feature announcements, and community highlights.
\ No newline at end of file
+- [Blog](https://blog.radium.live/): A collection of articles and updates about Radium, including release notes, feature announcements, and community highlights.
+
+
+## Table of Contents
+
\ No newline at end of file
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
new file mode 100644
index 0000000..150c9f4
--- /dev/null
+++ b/src/layouts/Layout.astro
@@ -0,0 +1,15 @@
+---
+const { title } = Astro.props;
+---
+
+
+
+
+
+
+ Radium Help - {title}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/[collection]/[...slug].astro b/src/pages/[collection]/[...slug].astro
index a26f5f5..2251fc0 100644
--- a/src/pages/[collection]/[...slug].astro
+++ b/src/pages/[collection]/[...slug].astro
@@ -1,6 +1,7 @@
---
import { getCollection, render } from "astro:content";
import { collectionNames, isSiteCollection } from "../../config/content";
+import Layout from "../../layouts/Layout.astro";
export async function getStaticPaths() {
const paths = [];
@@ -32,4 +33,6 @@ const { entry } = Astro.props;
const { Content } = await render(entry);
---
-
+
+
+
\ No newline at end of file
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 87c1ee3..946be82 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -1,43 +1,8 @@
---
-import { getCollection } from "astro:content";
-import { collectionNames } from "../config/content";
-
-const sections = await Promise.all(
- collectionNames.map(async (name) => {
- const entries = (await getCollection(name)).sort((a, b) =>
- a.data.title.localeCompare(b.data.title)
- );
-
- const indexEntry = entries.find((entry) => entry.id === "index");
- const articles = entries.filter((entry) => entry.id !== "index");
-
- return {
- name,
- indexEntry,
- articles,
- };
- })
-);
+import Layout from "../layouts/Layout.astro";
+import TOC from "../components/TOC.astro";
---
-
- {sections.map((section) => (
- -
- {section.indexEntry ? (
- {section.indexEntry.data.title}
- ) : (
- section.name
- )}
-
- {section.articles.length > 0 && (
-
- )}
-
- ))}
-
+
+
+