387 字
2 分钟
Markdown 步骤流
对于顺序重要的操作流程,可以使用步骤流组件。组件通过低调的编号轨道指示位置,保持文章阅读连贯;标题、段落、链接、列表和代码仍保留原生 Markdown 语义。
有序列表语法
用 :::steps 容器包裹一个 Markdown 有序列表,每个顶层列表项都会成为一个步骤。
:::steps[生产部署]1. **克隆并准备工作区**
克隆仓库并进入项目目录。
```powershell git clone https://github.com/LyraVoid/Shirone.git Set-Location Shirone ```
2. **安装依赖**
使用仓库锁定的包管理器。
```powershell pnpm.cmd install ```
3. **运行项目检查**
确认 Astro 诊断与 TypeScript 检查通过。
```powershell npx.cmd astro check pnpm.cmd type-check ```
4. **构建生产站点**
生成静态站点和搜索索引。
```powershell pnpm.cmd build ```:::生产部署
克隆并准备工作区
克隆仓库并进入项目目录。
Terminal window git clone https://github.com/LyraVoid/Shirone.gitSet-Location Shirone安装依赖
使用仓库锁定的包管理器。
Terminal window pnpm.cmd install运行项目检查
确认 Astro 诊断与 TypeScript 检查通过。
Terminal window npx.cmd astro checkpnpm.cmd type-check构建生产站点
生成静态站点和搜索索引。
Terminal window pnpm.cmd build
选项
:::steps[标题]或title="标题"可添加可见标签和无障碍名称。start=4可修改首个显示的步骤编号。- 容器必须且只能包含一个有序列表。无效或混合格式的输入会保留为可读的普通 Markdown,不会被推测性解析。
- 渲染在站点构建时完成,不会增加客户端 JavaScript 或网络请求。
Markdown 步骤流
https://blog.codingshen.top/posts/steps/分享文章
生成精美分享图或复制链接,与更多人分享本文。
继续阅读
换条路线
从其他文章中稳定抽取
最后更新于 ,距今已过 66 天
部分内容可能已过时
评论