348 字
2 分钟
返回首页
Markdown 步骤

对于讲究先后顺序的操作,请用步骤组件。该组件保持文章阅读流完整:一条安静的编号轨道提供定位,而标题、段落、链接、列表和代码仍保留各自原生的 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
```
:::

Production deployment

  1. 克隆并准备工作区

    克隆仓库并进入项目目录。

    Terminal window
    git clone https://github.com/LyraVoid/Shirone.git
    Set-Location Shirone
  2. 安装依赖

    使用仓库锁定的包管理器。

    Terminal window
    pnpm.cmd install
  3. 运行项目检查

    确认 Astro 诊断与 TypeScript 检查均通过。

    Terminal window
    npx.cmd astro check
    pnpm.cmd type-check
  4. 构建生产站点

    生成静态站点与搜索索引。

    Terminal window
    pnpm.cmd build

选项#

  • :::steps[Title] 或 title="Title" 会添加可见标签与无障碍名称。
  • start=4 会改变首个显示的步号。
  • 容器必须恰好包含一个有序列表。无效或混合的输入会保持为普通可读的 Markdown,而不会被启发式地解读。
  • 渲染在站点构建阶段完成,不会引入客户端 JavaScript 或网络请求。
Markdown 步骤
https://xiaobuhui.xyz/posts/steps/
作者
xiaobuhui
发布于
2026-08-27
许可协议
CC BY-NC-SA 4.0

分享文章

生成精美分享图或复制链接,与更多人分享本文。

继续阅读

沿着主题读

基于共同的标签与分类

换条路线

从其他文章中稳定抽取