Content organization: files, languages and assets

Content organization: files, languages and assets

Manage articles, pages, categories, tags and attachments with files and bundles.

Articles, standalone pages, categories and tags live in content/. Organize them in folders and use frontmatter for titles, addresses and other details.

Four content types

DirectoryPurpose
content/posts/Articles
content/pages/Standalone pages and builtin page introductions
content/categories/Category names, descriptions, covers and bodies
content/tags/Tag names, descriptions, covers and bodies

Each type supports Markdown, MDX and nested folders.

Files and addresses

Use hello.md or hello.mdx for a standalone file. For images and attachments, create a folder with index.md or index.mdx as the bundle entry.

slug determines the content address. For example, slug: content-bundle produces /en/posts/content-bundle/ under the default language prefix policy. An explicit slug stays the same when you move management folders.

Article details

title: An example article
slug: example
date: 2026-01-01
description: Introduce the article in one sentence.
categories: [guide]
tags: [astro, content]
image: ./cover.webp
featured: true

categories and tags refer to category and tag slugs. featured: true places an article in the sidebar’s pinned section. Dates and publication states are covered in Publishing and migration.

Images and attachments

Reference bundle images and files with relative paths:

A soft blue and cyan gradient

Example attachments: plain text, Python code, an HTML page, a Markdown attachment and an archive. They are published with the bundle during a build.

Multilingual content

Use language-suffixed files such as index.zh.mdx and index.en.md in the same folder to provide translations of an entry. Standalone files support the same naming pattern, such as hello.zh.md and hello.en.mdx.

The language menu opens the corresponding content. See Languages and translations to configure and add more languages.

Writing templates

Terminal
pnpm new post my-first-post --title "My first article"
pnpm new post a-bundle --use bundle --title "An article with attachments"
pnpm new page contact --use bundle

Choose a content type with post, page, category or tag, set the title with --title, and select a template with --use. Templates live in archetypes/ and can be adapted to your writing workflow.

Content managementLocalization

Search articles

Recent articles

Meet BlogGPTBrowsing and search: discover articles through conversationContent organization: files, languages and assetsMarkdown typography: text, tables and codeArticle enhancements: callouts, math, diagrams and lightboxesEnhancement switches: defaults and per-entry overrides

Keyboard shortcuts

Search articles
Ctrl+K
Toggle sidebar
Ctrl+Shift+S
Home
Ctrl+Shift+O
Focus search input
Shift+Esc
Keyboard shortcuts
Ctrl+/

Blog statistics

Articles
10
Characters
13,276
Days online
1021
Language
zh / en
First publication
Jul 22, 2025
Latest update
Oct 16, 2026
Average length
1,328
Average interval
50.1 days / article

Publishing in the past year

MWFNovDecJanFebMarAprMayJunJulAugSepOct

Public articles in the site timezone. Darker cells mean more posts.

Recent article lengths