Content and Series

Post frontmatter, folder-based series, project link cards, tags, and language.

Content lives under src/content/<collection>/. Frontmatter is validated at build time by src/content.config.ts; every entry declares lang: en or lang: ar.

Post frontmatter#

title, date, and lang are required:

---
title: "My First Note"
description: "Shown in cards and page metadata."
date: 2026-07-10
tags: [Astro, Markdown]
lang: en
cover: "https://example.com/cover.jpg"
toc: side
draft: false
---
FieldUse
date / updatedDatePublish and revision dates
tagsArchive filtering; discovered automatically
orderChapter order inside a series folder
toccenter, side, true, or false — overrides ui.toc.position
coverCover image on cards and the post page
commentsPer-post comment switch
math, mermaid, gallery, lightboxFeature hints

Series are folders#

A folder whose index.md has sibling Markdown files becomes a series — exactly like this guide:

posts/theme-guide/
├── index.md → /posts/theme-guide/
├── site-and-navigation.md → /posts/theme-guide/site-and-navigation/
└── …

Projects#

Projects are frontmatter-only link cards on /projects/ — the Markdown body is never rendered. links maps freely chosen keys to URLs; generic keys (website, docs, demo, …) and brand keys found in Simple Icons get icons automatically:

---
title: "Astro Narrow"
description: "An Astro-native content theme."
tags: [Astro]
order: 1
lang: en
links:
github: https://github.com/example/repo
website: https://example.com
---

Tags and archives#

Tags need no registry — Archives collects them from published posts. Filter URLs are shareable: /archives/?tag=Astro.

Languages and direction#

The site has one shared feed and one route tree. Set lang: ar for Arabic content; the entry uses RTL layout and IBM Plex Sans Arabic while the site interface remains English. Set lang: en for English content.

License

CC BY-NC-SA 4.0 This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Related Posts