Skip to content

fix: convert templates to XWiki 2.1 syntax (no extensions required) - #11

Merged
gerfru merged 2 commits into
mainfrom
feat/xwiki-syntax
Jul 4, 2026
Merged

fix: convert templates to XWiki 2.1 syntax (no extensions required)#11
gerfru merged 2 commits into
mainfrom
feat/xwiki-syntax

Conversation

@gerfru

@gerfru gerfru commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the "Can't find descriptor for markdown/1.2" error on XWiki 16 default install.

  • Root cause: we were sending syntax: markdown/1.2 which requires the Markdown Rendering extension — not installed by default
  • Fix: switch to syntax: xwiki/2.1 (always available, no extension needed)
  • Templates: all 5 converted from Markdown to XWiki 2.1 syntax (headings, tables, lists)
  • TODO markers: replaced {{info}}...{{/info}} macros (conflicted with Jinja2 {{ }} delimiters AND required an extension) with **⚠ TODO:** bold text — works out of the box
  • Filenames: .md.j2.xwiki.j2 to reflect actual content format

Test plan

  • uv run qms-kit deploy --target selfhosted --config config/clients/test.yaml completes without errors
  • XWiki pages render correctly (headers, tables, bold text visible)
  • CI passes (38 tests)

🤖 Generated with Claude Code

gerfru and others added 2 commits July 4, 2026 20:27
Packaging:
- Add [build-system] hatchling + tool.uv.package=true so qms-kit is
  a proper pip-installable CLI (was skipped before, entry point ignored)
- hatchling added to dev dependencies

Docs:
- readme: fix docker-compose path, replace python -m cli with qms-kit,
  full 6-step quickstart, Phase 1 marked complete
- docs/configuration.md: rewrite from TODO stub to full reference —
  all Pydantic model keys documented with types and descriptions,
  tracker_mapping example, validation error guide
- docs/architecture.md: fix CLI invocation to qms-kit deploy
- .markdownlint.json: disable MD033/MD060/MD013 (inline HTML and
  table pipe style are intentional in this repo)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rename *.md.j2 → *.xwiki.j2 (5 templates)
- Convert Markdown headings/tables/lists to XWiki 2.1 syntax
- Replace {{info}} macros (conflict with Jinja2 + requires extension)
  with **⚠ TODO:** bold markers — no XWiki extension needed
- XWiki adapter: syntax markdown/1.2 → xwiki/2.1
- CLI: template extension .md.j2 → .xwiki.j2
- Tests updated to reference new template filenames

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gerfru
gerfru merged commit 83d4e9e into main Jul 4, 2026
6 checks passed
@gerfru
gerfru deleted the feat/xwiki-syntax branch July 4, 2026 19:03
gerfru added a commit that referenced this pull request Jul 4, 2026
* feat(templates): Markdown as single source of truth with XWiki converter

- 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>

* fix(lint): remove f-string without placeholder (F541)

* fix(lint): ruff format xwiki.py, add ruff as dev dependency

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant