Formatting tour: math, diagrams, code, tables
A reference for what renders in mdfy. Every block below appears in real docs across this hub.
KaTeX math
Inline: . Display:
Matrix:
Mermaid diagrams
flowchart LR
Doc[(Doc)] --> Bundle((Bundle))
Bundle --> Hub[/Hub/]
Hub --> AI[Any AI]
AI -. cites .-> Doc
sequenceDiagram
participant U as You
participant M as mdfy
participant AI as Claude/ChatGPT
U->>M: Publish doc
M-->>U: Permanent URL
U->>AI: Paste URL
AI->>M: Fetch /raw/<id>
M-->>AI: Clean markdown + graph
Code with highlighting
typescriptconst res = await fetch("https://mdfy.app/api/hub/demo/recall", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ question: "react hooks", k: 5, rerank: true }),
});
const { results } = await res.json();
pythonimport requests
r = requests.post("https://mdfy.app/api/docs",
json={"markdown": "# Hello World"})
print(r.json()["url"]) # → "https://mdfy.app/abc123"
Tables
| Scope | URL | Cost |
|---|---|---|
| Doc | mdfy.app/<id> |
tightest |
| Bundle | mdfy.app/b/<id> |
mid (+graph) |
| Hub | mdfy.app/hub/<slug> |
broad |
That's the rendering vocabulary mdfy expects to handle on any doc.