AgentSkillsCN

jekyll-frontmatter-for-documentation-files

Jekyll 文档 Frontmatter

SKILL.md
--- frontmatter
name: "jekyll-frontmatter-for-documentation-files"
description: ""
applyTo: "doc/**/*.md"
id: "jekyll-documentation-frontmatter"
sourceAdrs:
  - "ADR-20260217T115123-AddJekyllFrontmatterToDocumentationFiles.md"

Jekyll Documentation Frontmatter

All markdown files in the /doc folder MUST include Jekyll-compatible YAML frontmatter for GitHub Pages integration.

Required Frontmatter Fields:

  • title (required): Page title for navigation and browser tab

Optional Frontmatter Fields:

  • layout: Page layout template (defaults to default)
  • nav_order: Numeric order for navigation menu placement
  • nav_exclude: Set to true to hide page from navigation
  • parent: Title of parent page for nested navigation

DO:

  • Include frontmatter block at the start of every documentation file
  • Use descriptive titles that work well in navigation menus
  • Assign nav_order values for logical documentation flow
  • Use parent field for creating nested navigation hierarchies

DON'T:

  • Omit the title field from any documentation file
  • Use duplicate nav_order values at the same hierarchy level
  • Create deeply nested navigation (prefer flat structure)

Example Frontmatter:

yaml
---
title: Commands Reference
nav_order: 3
---

Nested Page Example:

yaml
---
title: Slash Commands
parent: Commands Reference
nav_order: 1
---

Rationale: Jekyll frontmatter enables automatic GitHub Pages documentation site generation with consistent navigation and styling via the just-the-docs theme.