Site Basic Information & Content Collections
🕒 Reading time: 3 min📝 Words: 509👀 Views: Loading...
site.yml — Site Identity
File: stalux/config/site.yml
id: sitelang: en # Language: "en" | "zh-CN"title: Stalux Blog Theme # Site titleurl: https://stalux.needhelp.icu # Site URL (used for canonical, RSS, OpenGraph)description: "Blog theme Stalux ..." # Site description (SEO, OpenGraph)timezone: "Asia/Shanghai" # IANA timezone for date formattingfavicon: "/stalux.ico" # Favicon pathcanonical: "https://stalux.needhelp.icu" # Canonical URL (optional, falls back to url)# twitterSite: # Twitter/X site handle (optional)# noindex: false # Global noindex (optional, default false)# nofollow: false # Global nofollow (optional, default false)author.yml — Author Information
File: stalux/config/author.yml
id: authorname: xingwangzhe # Display nameavatar: /avatar.png # Avatar pathbio: Blog Theme Stalux # Short biojobTitle: Software Engineer # Optional public role, emitted in JSON-LD PersonRendered on: post sidebars, homepage author card, and SEO JSON-LD. jobTitle is optional and is emitted only in the JSON-LD Person entity; it does not change the visual author card.
Content Collections
Content is managed through Astro’s astro:content system under the stalux/ directory:
stalux/├── posts/ # Blog posts (.md / .mdx)├── about/ # About pages (.md / .mdx)├── words/ # Quotes & snippets (.md)└── config/ # Theme configuration (.yml)Posts (stalux/posts/*.md)
Required frontmatter:
| Field | Type | Description |
|---|---|---|
title |
string | Post title |
abbrlink |
string|number | Permanent link ID, generates /posts/{abbrlink} route |
date |
string | Publish time, ISO 8601 or YYYY-MM-DD HH:mm:ss |
desc |
string | Post description for SEO/OG. Must be manually written, 50–160 chars recommended |
Optional frontmatter:
| Field | Type | Default | Description |
|---|---|---|---|
updated |
string | — | Update time |
draft |
boolean | false |
Hide from published lists |
tags |
string[] | — | Tag array (single string auto-converted) |
categories |
string[] | — | Category array |
cc |
string | CC-BY-NC-SA-4.0 |
License |
cover |
string | — | Post cover image URL/path |
Example:
---title: Sample Postabbrlink: sample-postdate: 2025-05-10T12:00:00+08:00desc: A short description for SEO and preview cards.updated: 2025-05-12T09:00:00+08:00tags: [Tech, Essay]categories: [Frontend]cc: CC-BY-NC-SA-4.0draft: falsecover: /images/cover.jpg---
Post body...About (stalux/about/*.md)
Required: title (page title), description (page description).
Words (stalux/words/*.md)
Optional frontmatter: source, link, sourceDate, date, updated, draft.
Writing Notes
| Guideline | Detail |
|---|---|
| Delimiter | Wrap frontmatter between --- |
| Date format | ISO 8601 with timezone offset recommended |
| Permalinks | Choose stable custom abbrlink values (independent of title changes) |
| Descriptions | Must be meaningful for SEO and social share cards |
Site Basic Information & Content Collections
Author: xingwangzhe
Article link: https://stalux.needhelp.icu/posts/ad81245d/
This article is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.