stage-site-locally
Stages the Dart site locally for PR validation. Includes formatting Dart code, syncing excerpts, building the site, checking for broken links, and serving the development site.
来源信息
- 仓库
- dart-lang/site-www
- 最近来源活动
- 2026年3月26日 18:11
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 1,052
- 分支
- 793
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- stage-site-locally
- description
- Stages the Dart site locally for PR validation. Includes formatting Dart code, syncing excerpts, building the site, checking for broken links, and serving the development site.
# Prepare the Dart site for staging
Before reviewing changes, pushing a PR,
or testing the site locally,
follow these steps to properly stage the repository.
## 1. Update formatting
Update the formatting of the site's Dart code and examples
to stay compliant with standard formatting rules.
This must be done before syncing excerpts
so the generated code matches the source format:
```bash
dart run dash_site format-dart
```
## 2. Sync code excerpts
Ensure that any changes made to code examples in the workspace
are synced correctly into the corresponding Markdown files:
```bash
dart run dash_site refresh-excerpts
```
## 3. Build the site
For the link checker to validate local URLs,
the site must be built first.
Run the build command:
```bash
dart run dash_site build
```
## 4. Check for broken links
Verify that all internal pages, URLs, and markdown link references are intact.
First, check for broken Markdown link references:
```bash
dart run dash_site check-link-references
```
Second, check for broken cross-page links:
```bash
dart run dash_site check-links
```
If you detect any broken links,
attempt to patch them or alert the user about the issues.
## 5. Stage the site locally
Finally, serve a local development environment
to preview the changes in your browser:
```bash
dart run dash_site serve
```
在 GitHub 查看