Skip to content

示例文档 ​

这页演示常用的 Markdown 写法。

表格 ​

字段类型说明
titlestring文档标题,取首行 H1
ordernumber侧边栏排序,越小越靠前

代码块 ​

bash
npx vitepress build hub-v2     # 构建
npx vitepress preview hub-v2 --port 5090   # 预览
php
<?php
echo "支持语法高亮,语言名写在代码块后面即可";

Mermaid 流程图 ​

flowchart LR
  A[写 .md 文档] --> B[frontmatter 加 order]
  B --> C[config.mts 加 ENTRY]
  C --> D[构建]
  D --> E[Nginx 托管 dist]

提示块 ​

提示

支持 VitePress 的 ::: tip / warning / danger / details 容器语法。

注意

站点挂在子路径时必须在 config.mts 设置 base,否则图标、样式、搜索全 404。