fix(ui): map drop-style page URLs to markdown twins - #48
Conversation
Copy page and the LLM actions looked for .html → .md. Production pages omit .html, so the button fetched the HTML page instead of index.md.
|
@ngarakapati Can we confirm that query parameters and hash fragments are preserved correctly for the new URL styles? For example, /overview/?foo=bar should resolve to /overview/index.md?foo=bar, and /overview/index.html#section to /overview/index.md#section. A unit test for these cases would make this explicit. Has the rebuilt build/ui-bundle.zip been generated from the exact final version of src/helpers/md-url.js, and has the updated bundle been tested in the Cloud/Savanna preview? |
Add a node assert suite for the three page URL styles and for preserving ?query and #hash, and wire it to npm test.
|
Added unit tests for
Query and hash are preserved on all three styles. 15 cases, all passing. Rebuilt |
Pick up the merged md-url helper from tigergraph/antora-ui#48.
Summary
Copy page / View as Markdown / Open in ChatGPT·Claude·Cursor all look up a
.mdtwin by swapping.html→.md.Production docs omit
.html(/savanna/main/overview/), so the button currently getsdata-md-url="./"and fetches the HTML page.This updates
md-urlso both URL styles work:/overview/index.html→/overview/index.md/overview/→/overview/index.md/overview/pricing→/overview/pricing.mdbuild/ui-bundle.zipis rebuilt with the helper.Merge order
Merge this PR first, then the companion change on cloud-docs#171 (
htmlToMdUrlinlib/llm-utils.js) so the published.mdpaths match what the button fetches.Based on current
mainafter #47, so no rebase conflict with that merge.