a8186111ac46292a01317fe04bf69e47a8a8aa6c
radie-help
Content-driven help site built with Astro and MDX.
Requirements
node >= 22.12.0npm
Basic Setup
- Install dependencies:
npm install
- Start the local dev server:
npm run dev
- Open
http://localhost:4321.
Available Commands
| Command | What it does |
|---|---|
npm run dev |
Start the local Astro dev server |
npm run build |
Build the site for production |
npm run preview |
Preview the production build locally |
How Content Works
- Each top-level folder inside
src/content/is a content section. - The current site includes one section:
src/content/website/. - Files in a section can be
.mdor.mdx. - Each content file must include frontmatter with:
---
title: Page Title
description: Short summary
---
index.mdxbecomes the landing page for that section. Example:src/content/website/index.mdxmaps to/website- Any other file becomes a subpage under that section.
Example:
src/content/website/registration.mdxmaps to/website/registration
Adding A New Content Subpage
To add a new page inside an existing section:
- Create a new
.mdor.mdxfile in the relevant folder undersrc/content/. - Add the required frontmatter:
---
title: New Page
description: What this page covers
---
- Add the page body content.
Example:
src/content/website/account-recovery.mdx
This page will be available at:
/website/account-recovery
Adding A New Content Section
If you want a new group of subpages, create a new folder in src/content/ and then register it in config.
1. Create the folder and files
Example:
src/content/mobile-app/
├── index.mdx
└── notifications.mdx
index.mdx should describe the section landing page. Any additional files become subpages for that section.
2. Update src/content.config.ts
Add a collection for the new folder and export it:
const mobileApp = defineCollection({
loader: glob({ base: "./src/content/mobile-app", pattern: "**/*.{md,mdx}" }),
schema: articleSchema,
});
export const collections = {
website,
mobileApp,
};
3. Update src/config/content.ts
Add the new collection name so routing and navigation include it:
export const collectionNames = ["website", "mobileApp"] as const;
4. Run the site locally
npm run dev
Verify that:
- the new section appears on the home page
- the section index page loads
- the new subpages resolve under the expected URL path
Contributor Notes
- Keep one topic per file.
- Use
index.mdxonly for a section landing page. - Prefer lowercase, hyphenated filenames for clean URLs.
- If you create a new top-level content folder, update both
src/content.config.tsandsrc/config/content.ts.
Description
Languages
Astro
49.9%
MDX
31.5%
CSS
10%
TypeScript
6.4%
JavaScript
2.2%