Repository navigation
feat: export Backstage TechDocs projects (#145) - #155
Merged
Merged
Conversation
Add `codewiki generate --techdocs [--techdocs-dir DIR]` and a standalone `codewiki techdocs [DOCS_DIR] [OUT_DIR]` (no LLM calls) that turn CodeWiki output into an MkDocs project `techdocs-cli generate` builds as is: mkdocs.yml (techdocs-core, nav from the module tree, mermaid superfences) plus docs/ with the overview as index.md. Pages get front matter, a provenance banner and a collapsible list of the documented components linked to the source at the documented commit. JSON files and temp/ are not published, the source docs are never modified, and only a docs/ folder created by an earlier export is replaced. Based on the generator proposed in the issue, with the double docs/docs folder on re-runs and the nav membership check fixed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #145.
What
Adds Backstage TechDocs output, built on the generator proposed in the issue.
codewiki generate --techdocs [--techdocs-dir DIR](default./techdocs) exports right after generation, like--github-pages.codewiki techdocs [DOCS_DIR] [OUT_DIR]exports existing docs without any LLM calls. Re-run it after--update.The output is an MkDocs project that
techdocs-cli generatebuilds as is:Each page gets front matter (title/description), a provenance banner (commit, date, model) and a collapsible "Documented components" list linked to the source at the documented commit. The repository URL comes from git
origin: SSH remotes become https and credentials are dropped. GitHub, GitLab and bitbucket.org links are built automatically, and--source-url-templatecovers other hosts. JSON files andtemp/are not published, and the source docs are never modified.Changes from the script in the issue
_prepare_out_docswas passedout/docsand appendeddocsagain. Stale pages were never cleared and the marker file landed indocs/docs/.**bold**was skipped as a list item, and fenced code wasn't tracked.generate --techdocsvalidates the output folder before the LLM run.Safety
docs/folder created by an earlier export (it carries a marker file) is ever replaced.Docs
guides/backstage-techdocs.mdcovering the catalog annotation, building with techdocs-cli, and the Mermaid addon Backstage needs to render diagrams.guides/cli-reference.mdand the CHANGELOG.Testing
tests/test_techdocs.py: 15 tests covering both layouts, link rewriting, the nav, banner and components, re-runs, the refusals, URL normalisation and the CLI.docs/(35 pages) and built it withmkdocs build --strictusingmkdocs-techdocs-core1.7.1. It builds cleanly, and Mermaid, admonitions and the details blocks render.