Render Markdown uploads into branded HTML pages#13
Merged
Conversation
Accept .md/.markdown uploads (web and API) and render them server-side into self-contained, brand-styled HTML pages, so the stored paste is still HTML and every existing endpoint (raw, render, live origin, /markdown read-back, source view, title extraction) keeps working. - MarkdownDocument: GitHub-flavored Markdown via commonmarker (tables, task lists, strikethrough, autolinks, footnotes), code highlighted with Rouge (github.dark, no runtime fetch), and mermaid fences left as <pre class= "mermaid"> upgraded by a pinned CDN module injected only when a diagram is present. Raw HTML in the Markdown is dropped; the plain HTML upload path remains for arbitrary markup. - Paste: detect Markdown by filename, render at ingest via render_content (shared by from_upload and republish), and widen filename validation. - API: also detect a text/markdown body and default its filename to .md. - Web: dropzone and file input accept .md/.markdown; constraints copy updated (en + ar). - llms.txt: document the Markdown upload path; keep the mark-it-down guide as the no-server alternative. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K8nFQAeyYDYaNFUjtzaEvg
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.
Accept .md/.markdown uploads (web and API) and render them server-side into
self-contained, brand-styled HTML pages, so the stored paste is still HTML and
every existing endpoint (raw, render, live origin, /markdown read-back, source
view, title extraction) keeps working.
lists, strikethrough, autolinks, footnotes), code highlighted with Rouge
(github.dark, no runtime fetch), and mermaid fences left as
(shared by from_upload and republish), and widen filename validation.
(en + ar).
the no-server alternative.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01K8nFQAeyYDYaNFUjtzaEvg