Understanding Content Structure

· 1 min read

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.

FileURL
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/.

FileURL
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-10
tags: [sidey, astro]
draft: false
---

Adding a new writing

The quickest way is with the built-in script:

Terminal window
npm run new

It 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.

#sidey #astro
Back to Writings