Frontmatter Schema

title: { type: String, required: true, desc: "H1 Title / SEO Title" }
description: { type: String, max_length: 160, desc: "Meta description for Zensical social card" }
created: { type: Date, format: "YYYY-MM-DD HH:mm" }
last_modified: { type: Date, format: "YYYY-MM-DD HH:mm" }
lang: { type: String, enum: ["zh-TW", "en-US", "ja-JP"] }
type: { type: String, enum: ["tutorial", "guide", "reference", "concept"] }
status: { type: String, enum: ["new", "update", "deprecated"] }
version: { type: String, desc: "Semantic versioning or change type" }
author: { type: String, default: "Jase" }
reviewers: { type: Array, default: [] }
notes: { type: Array, desc: "Internal editor notes" }
ga_views: { type: Integer, default: 0, desc: "GA4 total page views" }
feedback: { type: Integer, default: 0, desc: "Net feedback score (Up minus Down) from zensical feedback widge" }
products: { type: Array, enum: ["EC", "POS", "WMS"] }
modules: { type: Array, desc: "Matching CYB admin console leftsidebar menu" }
sites: { type: Array, enum: ["TW", "JP", "US"] }
audiences: { type: Array, enum: ["admin", "developer", "clerk"] }
difficulty: { type: String, enum: ["beginner", "intermediate", "advanced"] }
tnb: { type: String, enum: ["trunk", "branch"] }
plans: { type: Array, enum: ["專業", "進階", "高手", "專業 PLUS", "進階 PLUS", "高手 PLUS", "企業"] }
cyb_extensions: { type: Array, default: ["APP MARKET", "AUTOMATION", "CHANNEL BRIDGE", "CHAT BOX", "EXPRESS", "NOW!", "STORE PAL", "TICKET"] }
intents: { type: Array, desc: "Search intent/User goal" } 
features: { type: Array, desc: "Specific system features mentioned" } 
prerequisites: { type: Array, desc: "Required reading/tasks/documents" }
related: { type: Array, desc: "Related documents" }
tags: { type: Array, desc: "SEO internal keywords" }
acoiv: { type: String, enum: ["activate", "configure", "operation", "integration", "venture"] }
apis: { type: Array, desc: "List of API endpoints" }
devices: { type: Array, enum: ["desktop", "mobile", "tablet"] }
ui_components: { type: Array, desc: "UI elements mentioned" }
paths: { type: Array, desc: "admin console navigation routes mentioned" }
layouts: { type: Array, enum: ["classic", "draggable"] }
wp_url: { type: Array, desc: WordPress docs urls } 
permalink: { type: String, desc: "Slug for Zensical URL" }
comments: { type: Boolean, default: false }
search:
  exclude: { type: Boolean, default: false }
icon: { type: String, desc: "Lucide icon (e.g., lucide/braces)" }
hide: { type: Array, enum: ["navigation", "toc", "feedback"] desc: "Visual elements to hide on the page"
 

Field Specification & Taxonomy

1. 標誌與語系 (Identity & Localization)

KeyTypeRequiredDescription
titleString文件標題:SEO 與 H1 的主要來源。
descriptionString內容摘要:用於 Zensical Social Cards,建議 160 字內。
createdDate/Time✅.建立日期:文件最初產生的時間。由核心模板於建立時填入,後續不應更改
last_modifiedDate最後更新:格式必須為 YYYY-MM-DD HH:mm
langEnum語系zh-TW, en-US, ja-JP
permalinkString固定連結:Zensical 產出的 URL Slug。

2. 文件生產流程 (DDLC)

KeyTypeDefaultDescription
typeEnum-tutorial, guide, reference, concept
statusEnum-new, update, deprecated
versionString-語義化版本或變更類型 (如: Refactor, Rewrite, Revise)。
authorString文件主要負責人。
reviewersArray[]審核者清單。
notesArray[]內部筆記:僅供編輯者閱讀,不對外發佈。

3. 數據統計 (Metrics & Performance)

KeyTypeDefaultDescription
ga_viewsInteger0累積瀏覽量:由系統定期從 GA4 同步,代表該頁面總點擊整數。
feedbackInteger0回饋淨值:正負評抵銷後的整數得分 (Upvotes - Downvotes)。

4. 產品與商業範疇 (Product & Commercial)

KeyTypeDescription
productsArray產品線:EC, POS, WMS
modulesArray功能模組:須對照 CYB 後台左側選單 名稱。
sitesArray適用站點:TW, JP, US
tnbEnumtrunk (全方案適用) 或 branch (特定方案)。
plansArray方案限制專業, 進階, 高手, 專業 PLUS, 進階 PLUS, 高手 PLUS, 企業
cyb_extensionsArray官方外掛APP MARKET, AUTOMATION, CHANNEL BRIDGE, CHAT BOX, EXPRESS, NOW!, STORE PAL, TICKET

5. 使用者情境 (User Context)

KeyTypeDescription
audiencesArray目標對象:admin (商家/管理員), developer (開發人員), clerk(店員)。
difficultyEnum難易度:beginner, intermediate, advanced
intentsArray搜尋意圖:使用者想解決什麼問題?(例如:如何退貨)。
featuresArray功能特性:文中提到的特定系統功能。

6. 內容關聯 (Content Relations)

KeyTypeDescription
prerequisitesArray前置作業:開始此教學前必須先完成的事項或閱讀的文檔。
relatedArray延伸閱讀:相關文件。
tagsArray標籤:SEO 與搜尋引擎內部的輔助關鍵字。
acoivEnum維度分類activate, configure, operation, integration, venture

7. 技術架構 (Technical Metadata)

KeyTypeDescription
apisArray文件中調用的 API Endpoints 列表。
devicesArray適用設備:desktop, mobile, tablet
ui_componentsArray文中提到的介面元素名稱。
pathsArray後台路徑:文中提到的後台介面操作路徑。
layoutsEnum頁面佈局:classic (一般版型), draggable(拖拉版型)。

8. 外部整合與系統 (Zensical / WP)

KeyTypeDefaultDescription
wp_urlArray-對應 WordPress 的原始文件網址。
commentsBooleanfalse是否開啟頁面評論功能。
search.excludeBooleanfalse是否從搜尋結果中排除此頁。
iconString-Lucide 圖示:格式如 lucide/braceslucide/book
hideArray-隱藏頁面元素:可選擇 navigation (左側選單) 或 toc (右側大綱) feedback(回饋工具)