chadtmiller.com/knotless

Git hosted in your atproto account, on any stock PDS, fast enough for agents.

git clone knotless://chadtmiller.com/knotless

needs the knotless git helper. set it up

Render Markdown files in the web UI, with a plain view

Open chadtmiller.com wants to merge into main from chadtmiller.com/knotless:web/markdown-preview 0 comments
chadtmiller.com opened on Oct 22, 2026

A Markdown file's page now shows it rendered by default, like a README, with Preview / Code links in the file header. ?plain=1 shows the highlighted source, matching GitHub's convention. Raw is unchanged.

Server (web.rs)

  • Blob gains html: Option<String>, set for Markdown files shown as text. text and ranges still come back, so the toggle needs no extra data.
  • Relative links and images resolve from the file's own directory, using the same sanitizing markdown() as READMEs (raw HTML escaped, non-http(s)/mailto schemes dropped).
  • New is_markdown() (.md, .markdown, .mdown, .mkd), now also used for READMEs, so README.markdown renders too.
  • Repo::dir() factors out the directory-URL closure from listing.

Web

  • Blob page reads plain from the URL and switches between .prose HTML and CodeView. Toggle reuses the .filter / aria-current styling from the pulls/issues switch.
  • Blob.ts updated by hand to match what ts-rs should emit; cargo test will regenerate it.

Not done / to check

  • Not compiled or run here. Unit test added for is_markdown; no integration assertion on /_data/.../blob/...md yet in tests/web.rs.
  • The markdown screenshot baseline in harness/shots will change.
  • #L12 links to a Markdown file land on the preview; they need ?plain=1 (same as GitHub).