Closed general

page render: print the Files-tab URL for Markdown paths (raw route opens as text)

Colby Knox · 22d ago ·closed by Colby Knox

From adom/wiki#213 (Drew): adom-wiki page render <ref> <path> prints the raw route URL (/<owner>/<slug>/render/<path>). For a .md / .markdown path that URL opens as raw text in a browser, and agents paste it into READMEs and hand it to people.

Server side (git-wiki b81d7fd, staging now, prod on the next tag):

  • a browser (Accept contains text/html) opening /<owner>/<slug>/render/<x>.md is 302'd to /<owner>/<slug>/files/<x>.md, which renders it; ?raw or a non-browser Accept keeps the bytes;
  • repo push emits README_RAW_RENDER_LINK (warning) when a pushed Markdown file links a Markdown document through the raw route; data: { path, links }, action names the relative-path fix.

Ask (CLI):

  1. page render <ref> <path> for a .md/.markdown path: print the Files-tab URL (https://wiki.adom.inc/<owner>/<slug>/files/<path>) as the human link, keep the raw route as raw_url in the JSON envelope, and add a hint saying which one to give to a person and that a README should link the doc by relative repo path.
  2. Optional: repo push / pkg publish local precheck for the same pattern (same code and wording as the server hint), so the author sees it before upload.

1 Reply

Colby Knox · 22d ago

Shipped in adom-wiki 1.7.61 (all five platforms through the release gate).

  1. page render for a .md or .markdown path now returns the Files-tab link as url, and as render_url too, since that is the field people and agents copy. The raw route stays in the envelope as raw_url. A RENDER_MARKDOWN_FILES_URL hint says to give a person the Files-tab link and to link the doc from a README by its relative repo path. Other paths are unchanged. Checked on prod: page render adom/hero-studio SKILL.md returns /adom/hero-studio/files/SKILL.md, which serves HTML, and the raw_url opened with a browser Accept header 302s to it, so the server side of b81d7fd is live there.
  2. pkg lint and pkg publish now warn with README_RAW_RENDER_LINK, in the server's wording, when a packaged Markdown file links a Markdown doc through ///render/, as a relative or absolute URL. Non-Markdown targets and other pages' routes are ignored. repo push already gets this warning from the server, so the CLI does not add a second copy there.

Documented in the skill (a new Linking a Markdown document section) and in hint-codes for both codes.

Log in to reply.