跳转到内容

笔记编辑规范

Frontmatter 参考

---
title: 为每个页面提供标题
description: 页面描述用于页面元数据,将被搜索引擎和社交媒体预览捕获。
sidebar:
label: 文字显示在侧边栏
order: 1 # 数字越小,链接组中显示得越高
slug: edit
tableOfContents:
minHeadingLevel: 2
maxHeadingLevel: 3
lastUpdated: 2022-08-09
# 从生产版本中排除此页面
draft: true
---
---
title: "Linux 性能优化实战"
description: "涵盖 CPU、内存及 IO 调优的系统级指南"
slug: "linux-performance-tuning"
# 1. 排序控制 (配合 sidebar 自动生成使用)
sidebar:
label: "性能优化" # 侧边栏显示的短标题(若不填则默认使用 title)
order: 1 # 数字越小越靠前
badge: # 在侧边栏显示小标签
text: "核心"
variant: "note" # note(蓝), tip(绿), caution(橙), danger(红), success(紫)
# 2. 内容状态管理
lastUpdated: 2024-05-20 # 显式覆盖自动获取的时间
editUrl: true # 是否显示“编辑此页”按钮
# 3. 页面布局自定义
template: doc # 默认 doc,如果是引导页可以写 splash
tableOfContents: # 局部控制目录显示
minHeadingLevel: 2
maxHeadingLevel: 3
# 4. 社交媒体与 SEO
head:
- tag: meta
attrs:
property: og:image
content: https://docs.isrv.cn
---

为了提高效率,你可以结合 VS Code 用户代码片段 (Snippets) 使用:

  1. 在 VS Code 按 Ctrl+Shift+P,搜索 “Configure User Snippets”
  2. 选择 markdown
  3. 粘贴以下配置:
{
"Starlight Frontmatter": {
"prefix": "fm",
"body": [
"---",
"title: ${1:标题}",
"description: ${2:简短描述}",
"slug: ${3:url-path}",
"sidebar:",
" order: ${4:10}",
"---",
"",
"# ${1:标题}",
"",
"$0"
],
"description": "生成 Starlight 笔记标准头部"
}
}