feat(templates): Markdown as single source of truth - #12
Merged
Conversation
- Restore all 5 templates to clean Markdown (.md.j2) — removes the per-adapter .xwiki.j2 duplicates from PR #11 - Add templates/qms_index.md.j2: space landing page with document index table and XWiki internal links - Rewrite adapters/selfhosted/xwiki.py: add md_to_xwiki() converter (headings, tables, bold/italic, links, lists, blockquotes) and _md_inline() helper; deploy() now creates the full page hierarchy (WebHome index → QM Manual parent → nested document pages) - Update cli/main.py: renders qms_index.md.j2 first, uses .md.j2 ext - Add tests/test_md_to_xwiki.py: 17 unit tests for the converter - Update tests/test_adapters.py: adjust PUT call count to 3 (parent + 2 doc pages) to match new hierarchy deploy logic - Add pytest as dev dependency Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
.md.j2) — no more per-adapter duplicatesmd_to_xwiki()converter in the XWiki adapter handles headings, tables, bold/italic, links, lists, blockquotes at deploy timedeploy()now createsWebHome(index) →QM Manual(parent page) → nested document pagestemplates/qms_index.md.j2: space landing page with document index table and XWiki internal linkstests/test_md_to_xwiki.py).xwiki.j2templates from PR fix: convert templates to XWiki 2.1 syntax (no extensions required) #11Adapter strategy per phase
md_to_xwiki()regex converterpython-markdownto HTMLTest plan
uv run python -m pytest tests/ -v)uv run qms-kit deploy --target selfhosted --config config/clients/example.yaml --dry-runGenerated with Claude Code