← 指南与示例
398 字
2 分钟
Markdown 步骤流
对于顺序很重要的流程,请使用步骤流。该组件不会打断文章的阅读节奏:简洁的编号轨道用于指引方向,标题、段落、链接、列表和代码则保留原有的 Markdown 语义。
有序列表语法
使用 :::steps 容器包裹一个 Markdown 有序列表。每个顶层列表项都会成为一个步骤。
:::steps[生产部署]1. **克隆并准备工作区**
克隆仓库并进入项目目录。
```powershell git clone https://github.com/LyraVoid/Shirone.git Set-Location Shirone ```
2. **安装依赖**
使用仓库指定的软件包管理器。
```powershell pnpm install ```
3. **运行项目检查**
确认 Astro 诊断和 TypeScript 检查通过。
```powershell npx astro check pnpm type-check ```
4. **构建生产站点**
生成静态站点和搜索索引。
```powershell pnpm build ```:::生产部署
克隆并准备工作区
克隆仓库并进入项目目录。
Terminal window git clone https://github.com/LyraVoid/Shirone.gitSet-Location Shirone安装依赖
使用仓库指定的软件包管理器。
Terminal window pnpm install运行项目检查
确认 Astro 诊断和 TypeScript 检查通过。
Terminal window npx astro checkpnpm type-check构建生产站点
生成静态站点和搜索索引。
Terminal window pnpm build
可选参数
:::steps[标题]或title="标题"会添加可见标签和无障碍名称。start=4会更改首个显示的步骤编号。- 容器中必须恰好包含一个有序列表。无效或混合的输入会保留为可正常阅读的普通 Markdown,而不会被猜测性解析。
- 渲染在站点构建期间完成,不会增加客户端 JavaScript 或网络请求。
Markdown 步骤流
https://blog.datahuk.top/posts/guide/steps/分享文章
生成精美分享图或复制链接,与更多人分享本文。
最后更新于 ,距今已过 89 天
部分内容可能已过时