Site Basic Information & Content Collections

🕒 Reading time: 3 min📝 Words: 509👀 Views: Loading...

site.yml — Site Identity

File: stalux/config/site.yml

id: site
lang: en # Language: "en" | "zh-CN"
title: Stalux Blog Theme # Site title
url: 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 formatting
favicon: "/stalux.ico" # Favicon path
canonical: "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: author
name: xingwangzhe # Display name
avatar: /avatar.png # Avatar path
bio: Blog Theme Stalux # Short bio
jobTitle: Software Engineer # Optional public role, emitted in JSON-LD Person

Rendered 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:

Terminal window
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 Post
abbrlink: sample-post
date: 2025-05-10T12:00:00+08:00
desc: A short description for SEO and preview cards.
updated: 2025-05-12T09:00:00+08:00
tags: [Tech, Essay]
categories: [Frontend]
cc: CC-BY-NC-SA-4.0
draft: false
cover: /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.

Creative Commons