Agent Skillsflet-dev/flet › docs-build-and-verify

docs-build-and-verify

GitHub

用于构建、预览和验证 Flet 文档网站,检查死链、坏图及未解析的交叉引用。

.agents/skills/docs-build-and-verify/SKILL.md flet-dev/flet

触发场景

构建文档网站 检查文档链接有效性 验证文档图片完整性

安装

npx skills add flet-dev/flet --skill docs-build-and-verify -g -y
更多选项

非标准路径

npx skills add https://github.com/flet-dev/flet/tree/main/.agents/skills/docs-build-and-verify -g -y

不安装直接使用

npx skills use flet-dev/flet@docs-build-and-verify

指定 Agent (Claude Code)

npx skills add flet-dev/flet --skill docs-build-and-verify -a claude-code -g -y

安装 repo 全部 skill

npx skills add flet-dev/flet --all -g -y

预览 repo 内 skill

npx skills add flet-dev/flet --list

SKILL.md

Frontmatter
{
    "name": "docs-build-and-verify",
    "description": "Use when asked to build, preview, or verify the Flet documentation website, including checking for broken links, broken images, and unresolved reST cross-references."
}

Docs Build and Verification

Prerequisites

Node.js 20 is required:

nvm use 20

Build

Full production build (includes broken link detection):

cd website && yarn build

Dev server with hot reload:

cd website && yarn start

Regenerate API data and sidebars only (no Docusaurus build):

cd website && yarn crocodocs:generate

Check Broken Links

yarn build automatically reports broken links and anchors. The build fails if any are found.

Check Broken Images

Run this after yarn build to find images referenced in HTML that don't exist:

cd website && python3 -c "
import re, os, glob

build_dir = 'build'
img_re = re.compile(r'<img[^>]+src=\"(/[^\"]+)\"', re.IGNORECASE)
broken = []

for html_file in sorted(glob.glob(f'{build_dir}/docs/**/index.html', recursive=True)):
    page = html_file.replace(build_dir + '/', '').replace('/index.html', '')
    content = open(html_file).read()
    for match in img_re.finditer(content):
        src = match.group(1)
        if src.startswith('http') or src.startswith('data:'):
            continue
        file_path = os.path.join(build_dir, src.lstrip('/'))
        if not os.path.exists(file_path):
            broken.append((page, src))

if broken:
    print(f'Found {len(broken)} broken images:')
    for page, src in broken:
        print(f'  {page}: {src}')
else:
    print('No broken images found!')
"

Check Unresolved reST Cross-References

After building, check for reST roles that failed to resolve and appear as raw text:

cd website && grep -r ':attr:\|:class:\|:meth:\|:func:' build/docs/ --include='*.html' -l

If any files are listed, those pages have unresolved cross-references that render as plain text instead of links.

版本历史

  • 8f74fe9 当前 2026-08-20 12:12

同 Skill 集合

.agents/skills/create-flet-control-integration-tests/SKILL.md
.agents/skills/create-flet-example-projects/SKILL.md
.agents/skills/docs-conventions/SKILL.md
.agents/skills/fix-members-short-description/SKILL.md
.agents/skills/flet-deprecation/SKILL.md
.agents/skills/imperative-to-declarative-flet/SKILL.md
.agents/skills/implement-flet-extension/SKILL.md
.agents/skills/prepare-flet-release/SKILL.md
.agents/skills/test-flet-apps-dev/SKILL.md
.agents/skills/update-flet-control-doc-gifs/SKILL.md
.agents/skills/write-changelog-entry/SKILL.md
website/.agents/skills/flet-release-announcement/SKILL.md
.agents/skills/run-unit-tests/SKILL.md
.agents/skills/run-integration-tests/SKILL.md

元信息

文件数
0
版本
b45d4a5
Hash
31cf5464
收录时间
2026-08-20 12:12

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 16:21
浙ICP备14020137号-1 $访客地图$