360 字
2 分钟
Markdown 步骤
当流程的先后顺序很重要时,可以使用 Steps 组件。该组件保持了文章的阅读流:一条低调的编号栏提供方位感,而标题、段落、链接、列表和代码仍保持其原生 Markdown 角色。
有序列表语法
把一个 Markdown 有序列表包在 :::steps 容器中。每个顶层列表项都会成为一个步骤。
:::steps[Production deployment]1. **Clone and prepare the workspace**
Clone the repository and enter the project directory.
```powershell git clone https://github.com/LyraVoid/Shirone.git Set-Location Shirone ```
2. **Install dependencies**
Use the repository's pinned package manager.
```powershell pnpm.cmd install ```
3. **Run project checks**
Confirm Astro diagnostics and TypeScript checks pass.
```powershell npx.cmd astro check pnpm.cmd type-check ```
4. **Build the production site**
Generate the static site and search index.
```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]或title="Title"会添加一个可见标签和无障碍名称。start=4会更改首个显示的步骤编号。- 容器必须恰好包含一个有序列表。无效或混合的输入仍会作为普通可读的 Markdown 呈现,而不会被启发式地解释。
- 渲染在站点构建期间完成,不会引入任何客户端 JavaScript 或网络请求。
分享文章
生成精美分享图或复制链接,与更多人分享本文。
继续阅读
换条路线
从其他文章中稳定抽取
最后更新于 ,距今已过 6 天
部分内容可能已过时