Skip to content

Convert docs from committed HTML to Markdown source with CI build step#1

Merged
shenxianpeng merged 2 commits intomainfrom
copilot/convert-document-to-markdown
Mar 24, 2026
Merged

Convert docs from committed HTML to Markdown source with CI build step#1
shenxianpeng merged 2 commits intomainfrom
copilot/convert-document-to-markdown

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

Documentation was hand-authored and committed as HTML, with Markdown sources in docs/ serving no functional purpose. HTML should be a build artifact generated at deploy time, not a versioned file.

Changes

Build script

  • scripts/build_docs.py — reads docs/*.md + docs/zh/*.md, converts via Python markdown library, injects the shared site template (CSS, nav, sidebar with active state, breadcrumbs, footer), rewrites internal .md hrefs to .html, and writes to website/docs/ / website/zh/docs/

Repository cleanup

  • Deleted 14 HTML files — all of website/docs/*.html and website/zh/docs/*.html; these are now build outputs only
  • .gitignore — added website/docs/ and website/zh/docs/ to prevent re-committing generated files

Missing source file

  • docs/zh/plugin-guide.md — the Chinese plugin guide existed only as HTML; created the Markdown source from its content

Workflow update

  • deploy-website.yml — added Python 3.11 setup, pip install markdown, and python scripts/build_docs.py before the upload step; extended path trigger to include docs/** so Markdown edits trigger a redeploy
- name: Install Markdown library
  run: pip install markdown

- name: Build docs HTML from Markdown
  run: python scripts/build_docs.py

website/index.html and website/zh/index.html (hand-crafted landing pages with no Markdown equivalent) are intentionally retained as static sources.

Original prompt

So, right now, the document was created as HTML. Actually, it should be a Markdown file, and then when you build it and publish it, it converts to HTML.

Please:

Make the document as a Markdown file
Remove all the HTML files from the repository
And when you publish it to the GH Pages branch, it should be the HTML file.


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

- Add scripts/build_docs.py to generate HTML from Markdown at deploy time
- Add docs/zh/plugin-guide.md (missing Chinese translation source)
- Remove pre-compiled HTML from website/docs/ and website/zh/docs/
- Update .gitignore to exclude generated HTML directories
- Update deploy-website.yml to run build script before deployment and
  watch docs/** path changes

Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Agent-Logs-Url: https://github.com/castops/cast-cli/sessions/a0457fb6-ae95-41e1-bca4-d85e022785eb
Copilot AI changed the title [WIP] Convert document to Markdown file and remove HTML files Convert docs from committed HTML to Markdown source with CI build step Mar 24, 2026
Copilot AI requested a review from shenxianpeng March 24, 2026 15:02
@shenxianpeng shenxianpeng added the documentation Improvements or additions to documentation label Mar 24, 2026
@shenxianpeng shenxianpeng marked this pull request as ready for review March 24, 2026 16:54
@shenxianpeng shenxianpeng merged commit 3fc9941 into main Mar 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants