Bỏ qua để đến nội dung

Cấu Trúc Dữ Liệu — DocKit Master

Tham Khảo Nhanh

  • Kiểu dữ liệu: Config schemas, Design tokens, YAML frontmatter
  • Storage: File-based (Markdown + CSS + JS config)
  • Database: Không có (stateless skill toolkit)
  • ORM: Không áp dụng

DocKit Master không sử dụng database truyền thống. Thay vào đó, dữ liệu được quản lý qua ba loại chính: Execution Config (runtime), YAML Frontmatter (per-page metadata), và CSS Design Tokens (visual system).

graph LR
style CONFIG fill:#2d333b,stroke:#6d5dfc,color:#e6edf3
style FRONT fill:#2d333b,stroke:#6d5dfc,color:#e6edf3
style TOKENS fill:#2d333b,stroke:#3fb950,color:#e6edf3
style MERMAID fill:#2d333b,stroke:#d29922,color:#e6edf3
CONFIG["⚙️ Execution Config<br/>DOC_TYPE, FORMAT, SCOPE"] --> FRONT["📝 YAML Frontmatter<br/>title, description, robots"]
FRONT --> TOKENS["🎨 CSS Design Tokens<br/>colors, spacing, shadows"]
FRONT --> MERMAID["📊 Mermaid Palette<br/>fill, stroke, text"]

Khi người dùng trả lời form cấu hình (Step 1), SKILL.md tạo execution config (SKILL.md:89-100):

FieldTypeValuesDefaultMô tả
DOC_TYPEenumtech, sop, api, allallLoại tài liệu cần tạo
FORMATenummarkdown, astroastroĐịnh dạng output
SCOPEenumfull, focusedfullPhạm vi quét code
FOCUS_TARGETstringdirectory/module namenullThư mục cụ thể (nếu focused)
LANGUAGEstringvi, en, vi+en, …auto-detectNgôn ngữ viết docs
I18Nbooleanyes, nonoĐa ngôn ngữ (chỉ cho astro)
RECORDbooleanyes, nonoQuay video walkthrough
PROJECT_PATHstringabsolute pathworkspaceĐường dẫn project
SEObooleanyes, noyesSEO optimization
LLM_OPTIMIZEbooleanyes, noyesAI/LLM optimization

Mỗi file .md được tạo phải có frontmatter theo chuẩn (content-guidelines.md:66-98):

---
title: "Tiêu Đề Trang" # 50-60 chars, có keyword
description: "Mô tả ngắn" # 150-160 chars, có CTA
---
---
title: "Page Title — Primary Keyword"
description: "Compelling description with CTA"
keywords: ["primary keyword", "related term"]
robots: "index, follow"
canonical: ""
og_title: ""
og_description: ""
og_type: "article"
sidebar:
order: 1
badge:
text: New
variant: tip
last_updated: "2026-02-27"
---
Giá trịÝ nghĩaDùng cho
"index, follow"Crawl + follow links ✅Mặc định — tất cả public docs
"noindex, nofollow"Không index, không followDrafts, admin pages
"noindex, follow"Không index nhưng follow linksDuplicate content

Design system được định nghĩa trong templates/astro-premium/src/styles/custom.css:18-49:

TokenLightDarkMục đích
--sl-color-accent#6d5dfc#8a7efdMàu nhấn chính
--sl-color-accent-low#eee8ff#1a1440Background nhấn
--sl-color-accent-high#3520a0#d0c9ffText nhấn
--sl-color-bg#0d1117Background chính (dark)
--sl-color-bg-navrgba(22,27,34,0.85)Navbar glassmorphism
--sl-color-text#e6edf3Text chính
TokenGiá trịSử dụng
--doc-spacing-xs0.25rem (4px)Padding nội dung nhỏ
--doc-spacing-sm0.5rem (8px)Padding bảng
--doc-spacing-md1rem (16px)Margin thẻ
--doc-spacing-lg1.5rem (24px)Padding admonition
--doc-spacing-xl2rem (32px)Heading margin
--doc-spacing-2xl3rem (48px)Section spacing

Tất cả Mermaid diagrams phải dùng bảng màu này (content-guidelines.md:206-218):

Thành phầnMàuMã hex
Node fillDark gray#2d333b
Node borderPurple#6d5dfc
Node textLight#e6edf3
BackgroundDark#161b22
Edge linesGray#8b949e
HighlightBright purple#8a7efd
SuccessGreen#3fb950
WarningYellow#d29922
DangerRed#f85149

File templates/astro-premium/astro.config.mjs chứa cấu hình Starlight:

Thuộc tínhKiểuMô tả
titlestringTên project hiển thị
descriptionstringMô tả project
defaultLocalestringLocale mặc định (root)
localesobjectMap locale → label + lang
customCssstring[]Custom CSS paths
tableOfContentsobjectminHeadingLevel: 2, maxHeadingLevel: 3
lastUpdatedbooleanHiển thị ngày cập nhật
sitestringURL triển khai (cho sitemap)

Xem thêm: Kiến trúc hệ thống · Luồng dữ liệu