Render Markdown to a docs site
Deploy a folder of Markdown files with no index.html and flypod renders them into a styled docs site with a sidebar and home page.
Deploy a folder of Markdown and flypod turns it into a styled HTML docs site:
npx flypod ./docsThe rule
flypod renders Markdown only when the deployed folder has no root
index.html. It picks up .md, .markdown, and .mdx files and converts
them to HTML using GFM (GitHub Flavored Markdown, via marked).
If the folder already has a root index.html, flypod serves it as-is,
untouched. No rendering happens. The Markdown-to-docs behavior is a fallback
for folders that have no HTML entry point.
What you get
- Multiple docs → a navigation sidebar linking every page.
- A
READMEorindexfile becomes the home page. - Each page's title is its first
# H1; if there is none, flypod prettifies the filename. - The raw Markdown is still served at its own path as
text/markdown, so the source stays fetchable.
Example
A folder like this:
docs/
README.md # → home page
install.md # → /install
api.md # → /apideploys to a docs site whose home is README.md, with install and api in
the sidebar. A page that starts with # Installing flypod gets the title
"Installing flypod"; a file named getting-started.md with no H1 gets
"Getting Started".
Agents get Markdown, browsers get HTML
Every rendered page is available in two representations at the same URL: the styled HTML a browser sees, and the raw Markdown source an AI agent would rather read. flypod picks between them per request using standard HTTP content negotiation — no separate URL, no config.
An agent that sends Accept: text/markdown gets the Markdown back:
curl -H "Accept: text/markdown" https://<your-site>.flypod.dev/installHTTP/1.1 200 OK
Content-Type: text/markdown; charset=utf-8
Vary: Accept
X-Markdown-Tokens: 214- The
Acceptheader decides.Accept: text/markdown(ranked at or abovetext/html) returns Markdown; a browser's HTML-preferringAcceptalways returns HTML. This is the same 27-year-old mechanism every HTTP client already speaks, and the convention coding agents like Claude Code use. - Known AI crawlers (GPTBot, ClaudeBot, PerplexityBot, and friends) get
Markdown even without an
Acceptheader — cleaner input for them, unchanged pages for everyone else. X-Markdown-Tokensgives an agent a rough token estimate up front so it can budget its context window before reading the body.Vary: Acceptis set on every response, so caches never hand a browser the Markdown or an agent the HTML.
The home page (/) negotiates too, returning the source of your README/
index doc. This only applies to folders flypod rendered from Markdown — if you
ship your own index.html, your HTML is always served as-is, never replaced.
You can still fetch any source file directly at its .md path at any time.
When to add an index.html instead
If you want full control over layout (your own HTML, CSS, and routing), ship an
index.html and flypod serves your folder verbatim. See
Deploy a site.