Skip to content

docs(site): render Markdown task lists - #299

Merged
SigureMo merged 2 commits into
redai-studio:mainfrom
ShigureNyako:session/sess_dev_neko_fix_relax_markdown_checklist_rendering
Sep 3, 2026
Merged

docs(site): render Markdown task lists#299
SigureMo merged 2 commits into
redai-studio:mainfrom
ShigureNyako:session/sess_dev_neko_fix_relax_markdown_checklist_rendering

Conversation

@ShigureNyako

@ShigureNyako ShigureNyako commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What

  • Render Markdown task-list markers as disabled checkboxes in the VitePress documentation.
  • Remove duplicate list bullets and align the generated checkbox controls with their task text.
  • Keep the change limited to the documentation renderer, its task-list styling, and the renderer dependency.

Why

The English and Chinese contribution checklists already store each task on its own valid - [ ] ... source line. However, VitePress's Markdown pipeline does not enable GitHub-style task lists by default, so the built pages emitted literal [ ] text instead of checkbox controls.

How

Configure VitePress to use the established markdown-it-task-lists plugin recommended by the VitePress maintainers in vuejs/vitepress#1923. The plugin recognizes [ ], [x], and [X] list-item markers, emits disabled checkbox inputs, and tags the generated list markup for scoped theme styling.

Testing

  • pre-commit run --all-files passes
  • Tests pass (pytest tests/) — GitHub CI passed on Python 3.10, 3.11, and 3.12
  • New tests added (not applicable; generated HTML was inspected directly)
  • Documentation updated (if applicable)

Additional validation:

  • npm run docs:build — passed; generated all four OpenAPI specs and completed the VitePress build.
  • Generated-HTML check — confirmed 72 source task items become 72 disabled checkbox inputs, including five each in the English and Chinese contribution pages.
  • Repository-wide Markdown scan — confirmed every checkbox marker is a single standalone task-list item and no source line contains multiple task markers.
  • GitHub CI — Pre-commit Checks, Lint, and tests on Python 3.10/3.11/3.12 all passed.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • CI/CD or build changes

Screenshots / Logs

Local VitePress builds of the same Chinese contribution-guide section at origin/main and this PR's head:

Before After
Before: task markers render as literal bracket text beside list bullets After: task markers render as aligned checkbox controls

# 📝 Documentation

## Render documentation checklists as checkbox lists

- Convert valid task-list markers into disabled checkbox inputs during the VitePress build
- Style task items without duplicate list bullets
- Preserve support for unchecked and checked task markers without adding a dependency
Comment thread docs/.vitepress/config.mts
# 📝 Documentation

## Adopt the VitePress-recommended Markdown-it plugin

- Replace the local task-list renderer with markdown-it-task-lists
- Keep the existing scoped task-list styling
- Use the established dependency recommended in VitePress issue discussions

Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
Comment thread docs/.vitepress/theme/custom.css

@SigureMo SigureMo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

话说你能在 PR 描述里加一下 before / after 的局部截图吗?

@ShigureNyako

ShigureNyako commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

已补充完成:PR 描述的 Screenshots / Logs 现在并排展示 before / after 局部截图。两张图分别来自同一中文贡献指南页面在 origin/main 和当前 PR head 8effd20 的本地 VitePress build。

@SigureMo SigureMo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@SigureMo
SigureMo merged commit adfd40d into redai-studio:main Sep 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants