Understanding Content Structure
Astro takes a simple approach to routing where your folder structure is your URL structure. With content collections, whatever you put in src/content becomes a page on your site.
Pages
Standalone pages like your home and about page live in src/content/pages.
| File | URL |
|---|---|
src/content/pages/home.mdx | / |
src/content/pages/about.mdx | /about |
home.mdx is the only special case, since it maps to the root URL (/) instead of /home. Every other page maps to its filename in src/content/pages.
These pages use the SinglePage layout with the following frontmatter:
---title: "About"description: "A short description of this page."draft: false---Writings
Writings live in src/content/writings. Each file becomes a page nested under /writings/.
| File | URL |
|---|---|
src/content/writings/getting-started.mdx | /writings/getting-started |
src/content/writings/using-mdx.mdx | /writings/using-mdx |
The /writings listing page is generated automatically from all entries in the collection, sorted by date from newest to oldest. Entries with draft: true are excluded from the listing.
Writing pages use the WritingPage layout with the following frontmatter:
---title: "Getting Started with Sidey"description: "Everything you need to install Sidey and write your first page."date: 2026-06-10tags: [sidey, astro]draft: false---Adding a new writing
The quickest way is with the built-in script:
npm run newIt prompts you for a title, description, and tags, then creates the file in src/content/writings with the correct frontmatter. New writings are created with draft: false by default.