本篇示例专用于系统解析与说明本主题在 src/content.config.ts 中通过 Zod Schema 定义的全部 Front Matter 字段。
一、支持的 Front Matter 字段清单
| 字段名称 | 类型 | 默认值 | 作用说明 |
|---|---|---|---|
title | string | 必填 | 文章主标题 |
pubDate | Date | 必填 | 发布日期 (YYYY-MM-DD) |
updatedDate | Date | 可选 | 最近更新日期 |
description | string | 可选 | 文章摘要,用于 SEO 与卡片展示 |
author | string | 'shijianus' | 作者署名 |
tags | array<string> | [] | 标签列表 |
category | string | 可选 | 主分类名称 |
cover | string | 可选 | 封面主图 URL |
coverAlt | string | 可选 | 封面图 Alt 文本 |
featured | boolean | false | 是否设为精选推荐文章 |
sticky | number | 0 | 置顶权重 (数值越大越靠前) |
draft | boolean | false | 草稿标识 (生产构建自动过滤) |
postFormat | enum | 'standard' | WordPress 文章形态 (aside, status, quote, gallery 等) |
toc / hideToc | boolean | true / false | 是否开启 / 强制隐藏右侧目录 |
math | boolean | false | 是否启用 LaTeX 数学公式渲染 |
mermaid | boolean | false | 是否启用 Mermaid 矢量图表渲染 |
series | string | 可选 | 关联的文章系列名称 |
access | object | 可选 | 密码保护与地区 IP 拦截配置 |
二、标准 Front Matter 声明示例
---
title: "文章完整标题"
pubDate: 2026-08-28
description: "这是一篇包含完整元数据的示范文章。"
author: "shijianus"
category: "系统设计"
tags: ["Astro", "Markdown", "示例"]
cover: "/media/shijianus/workbench.jpg"
featured: true
sticky: 1
toc: true
math: true
mermaid: true
postFormat: "standard"
---Dieses Beispiel dient ausschließlich der systematischen Analyse und Erklärung aller Front‑Matter‑Felder, die in diesem Thema in src/content.config.ts mittels Zod Schema definiert sind.
1. Unterstützte Front‑Matter‑Felder
| Feldname | Typ | Standardwert | Beschreibung |
|---|---|---|---|
title | string | erforderlich | Artikelhaupttitel |
pubDate | Date | erforderlich | Veröffentlichungsdatum (YYYY‑MM‑DD) |
updatedDate | Date | optional | Datum der letzten Aktualisierung |
description | string | optional | Artikelzusammenfassung, verwendet für SEO und Kartenanzeige |
author | string | 'shijianus' | Autorname |
tags | array<string> | [] | Liste von Schlagwörtern |
category | string | optional | Hauptkategorie‑Name |
cover | string | optional | URL des Haupt‑Cover‑Bildes |
coverAlt | string | optional | Alt‑Text des Cover‑Bildes |
featured | boolean | false | Ob als hervorgehobener Artikel markiert |
sticky | number | 0 | Sticky‑Gewicht (höhere Zahl = weiter oben) |
draft | boolean | false | Entwurfskennzeichen (wird bei Produktions‑Build automatisch gefiltert) |
postFormat | enum | 'standard' | WordPress‑Artikeltyp (aside, status, quote, gallery usw.) |
toc / hideToc | boolean | true / false | Ob das Inhaltsverzeichnis aktiviert ist / Erzwingt das Ausblenden des rechten Verzeichnisses |
math | boolean | false | Ob LaTeX‑Mathematik‑Rendering aktiviert ist |
mermaid | boolean | false | Ob Mermaid‑Vektordiagramme aktiviert sind |
series | string | optional | Name der zugehörigen Artikelsereie |
access | object | optional | Konfiguration für Passwortschutz und IP‑Region‑Blockierung |
2. Standard‑Front‑Matter‑Beispiel
---
title: "Artikelvollständiger Titel"
pubDate: 2026-08-28
description: "Dies ist ein Demonstrationsartikel mit vollständigen Metadaten."
author: "shijianus"
category: "Systemdesign"
tags: ["Astro", "Markdown", "Beispiel"]
cover: "/media/shijianus/workbench.jpg"
featured: true
sticky: 1
toc: true
math: true
mermaid: true
postFormat: "standard"
---This example is specifically designed to systematically parse and explain all Front Matter fields defined in this theme via Zod Schema in src/content.config.ts.
1. List of Supported Front Matter Fields
| Field Name | Type | Default Value | Description |
|---|---|---|---|
title | string | Required | Main article title |
pubDate | Date | Required | Publication date (YYYY-MM-DD) |
updatedDate | Date | Optional | Last updated date |
description | string | Optional | Article summary, used for SEO and card display |
author | string | 'shijianus' | Author’s name |
tags | array<string> | [] | List of tags |
category | string | Optional | Main category name |
cover | string | Optional | Cover image URL |
coverAlt | string | Optional | Cover image Alt text |
featured | boolean | false | Whether to mark as a featured article |
sticky | number | 0 | Pin weight (higher value means higher priority) |
draft | boolean | false | Draft flag (automatically filtered in production builds) |
postFormat | enum | 'standard' | WordPress post format (aside, status, quote, gallery, etc.) |
toc / hideToc | boolean | true / false | Whether to enable / force hide the right-side table of contents |
math | boolean | false | Whether to enable LaTeX math formula rendering |
mermaid | boolean | false | Whether to enable Mermaid vector diagram rendering |
series | string | Optional | Name of the associated article series |
access | object | Optional | Password protection and regional IP blocking configuration |
2. Standard Front Matter Declaration Example
---
title: "Full article title"
pubDate: 2026-08-28
description: "This is a demonstration article with complete metadata."
author: "shijianus"
category: "System Design"
tags: ["Astro", "Markdown", "Example"]
cover: "/media/shijianus/workbench.jpg"
featured: true
sticky: 1
toc: true
math: true
mermaid: true
postFormat: "standard"
---Este artículo de ejemplo está dedicado a analizar y explicar sistemáticamente todos los campos de Front Matter definidos por este tema a través de un Esquema Zod en src/content.config.ts.
1. Lista de campos de Front Matter soportados
| Nombre del campo | Tipo | Valor predeterminado | Descripción |
|---|---|---|---|
title | string | Obligatorio | Título principal del artículo |
pubDate | Date | Obligatorio | Fecha de publicación (AAAA-MM-DD) |
updatedDate | Date | Opcional | Fecha de última actualización |
description | string | Opcional | Resumen del artículo, utilizado para SEO y visualización en tarjetas |
author | string | 'shijianus' | Firma del autor |
tags | array<string> | [] | Lista de etiquetas |
category | string | Opcional | Nombre de la categoría principal |
cover | string | Opcional | URL de la imagen de portada principal |
coverAlt | string | Opcional | Texto Alt de la imagen de portada |
featured | boolean | false | Si se marca como artículo destacado/recomendado |
sticky | number | 0 | Peso de fijación (mayor valor, más arriba) |
draft | boolean | false | Indicador de borrador (filtrado automáticamente en la compilación de producción) |
postFormat | enum | 'standard' | Formato de artículo de WordPress (aside, status, quote, gallery, etc.) |
toc / hideToc | boolean | true / false | Si se habilita / fuerza la ocultación del índice de contenido derecho |
math | boolean | false | Si se habilita la renderización de fórmulas matemáticas LaTeX |
mermaid | boolean | false | Si se habilita la renderización de diagramas vectoriales Mermaid |
series | string | Opcional | Nombre de la serie de artículos relacionados |
access | object | Opcional | Configuración de protección por contraseña e intercepción de IP por región |
2. Ejemplo de declaración estándar de Front Matter
---
title: "Título completo del artículo"
pubDate: 2026-08-28
description: "Este es un artículo de ejemplo con metadatos completos."
author: "shijianus"
category: "Diseño de sistemas"
tags: ["Astro", "Markdown", "ejemplo"]
cover: "/media/shijianus/workbench.jpg"
featured: true
sticky: 1
toc: true
math: true
mermaid: true
postFormat: "standard"
---Cet exemple est dédié à l’analyse et à l’explication systématiques de tous les champs Front Matter définis par le schéma Zod de ce thème dans src/content.config.ts.
1. Liste des champs Front Matter pris en charge
| Nom du champ | Type | Valeur par défaut | Description |
|---|---|---|---|
title | string | Obligatoire | Titre principal de l’article |
pubDate | Date | Obligatoire | Date de publication (AAAA-MM-JJ) |
updatedDate | Date | Optionnel | Date de la dernière mise à jour |
description | string | Optionnel | Résumé de l’article, utilisé pour le SEO et l’affichage des cartes |
author | string | 'shijianus' | Nom de l’auteur |
tags | array<string> | [] | Liste des tags |
category | string | Optionnel | Nom de la catégorie principale |
cover | string | Optionnel | URL de l’image de couverture principale |
coverAlt | string | Optionnel | Texte Alt de l’image de couverture |
featured | boolean | false | Indique si l’article est mis en avant |
sticky | number | 0 | Poids d’épinglage (plus la valeur est élevée, plus il apparaît en haut) |
draft | boolean | false | Indicateur de brouillon (filtré automatiquement en production) |
postFormat | enum | 'standard' | Format d’article WordPress (aside, status, quote, gallery, etc.) |
toc / hideToc | boolean | true / false | Active / force le masquage de la table des matières à droite |
math | boolean | false | Active le rendu des formules mathématiques LaTeX |
mermaid | boolean | false | Active le rendu des diagrammes vectoriels Mermaid |
series | string | Optionnel | Nom de la série d’articles associée |
access | object | Optionnel | Configuration de la protection par mot de passe et du blocage IP régional |
2. Exemple de déclaration Front Matter standard
---
title: "Titre complet de l'article"
pubDate: 2026-08-28
description: "Ceci est un article de démonstration avec des métadonnées complètes."
author: "shijianus"
category: "Conception de systèmes"
tags: ["Astro", "Markdown", "Exemple"]
cover: "/media/shijianus/workbench.jpg"
featured: true
sticky: 1
toc: true
math: true
mermaid: true
postFormat: "standard"
---本篇範例專用於系統解析與說明本主題在 src/content.config.ts 中透過 Zod Schema 定義的所有 Front Matter 欄位。
一、支援的 Front Matter 欄位清單
| 欄位名稱 | 類型 | 預設值 | 作用說明 |
|---|---|---|---|
title | string | 必填 | 文章主標題 |
pubDate | Date | 必填 | 發佈日期 (YYYY-MM-DD) |
updatedDate | Date | 可選 | 最近更新日期 |
description | string | 可選 | 文章摘要,用於 SEO 與卡片展示 |
author | string | 'shijianus' | 作者署名 |
tags | array<string> | [] | 標籤列表 |
category | string | 可選 | 主分類名稱 |
cover | string | 可選 | 封面主圖 URL |
coverAlt | string | 可選 | 封面圖 Alt 文字 |
featured | boolean | false | 是否設為精選推薦文章 |
sticky | number | 0 | 置頂權重 (數值越大越靠前) |
draft | boolean | false | 草稿標識 (生產建構自動過濾) |
postFormat | enum | 'standard' | WordPress 文章形態 (aside, status, quote, gallery 等) |
toc / hideToc | boolean | true / false | 是否啟用 / 強制隱藏右側目錄 |
math | boolean | false | 是否啟用 LaTeX 數學公式渲染 |
mermaid | boolean | false | 是否啟用 Mermaid 向量圖表渲染 |
series | string | 可選 | 關聯的文章系列名稱 |
access | object | 可選 | 密碼保護與地區 IP 攔截配置 |
二、標準 Front Matter 宣告範例
---
title: "文章完整標題"
pubDate: 2026-08-28
description: "這是一篇包含完整元資料的示範文章。"
author: "shijianus"
category: "系統設計"
tags: ["Astro", "Markdown", "範例"]
cover: "/media/shijianus/workbench.jpg"
featured: true
sticky: 1
toc: true
math: true
mermaid: true
postFormat: "standard"
---




评论