Encited

Serve pages as Markdown

Every page Encited renders is available in two formats. Crawlers and AI agents that would rather read content than markup can ask for Markdown, and get the same page with the tags stripped out. A page that is 170 KB of HTML is typically around 20 KB as Markdown, which matters to an agent working against a context limit.

You need: pre-rendering connected, on the Essential plan or above.

Two ways to ask#

Both return the same body.

Request Example
Add .md to the path https://example.com/pricing.md
Send an Accept header curl -H 'Accept: text/markdown' https://example.com/pricing

The homepage is /index.md. Encited accepts text/markdown, text/x-markdown, and application/markdown.

A request that asks for Markdown and HTML gets HTML. Send the Markdown type on its own when Markdown is what you want.

What comes back#

A frontmatter block with the page's title, description, language, and structured data, then the body:

---
title: "Pricing"
description: "Plans and what each one includes."
lang: en
json-ld: |
  { "@context": "https://schema.org", "@type": "WebPage" }
---

# Pricing

Plans and what each one includes.

Responses carry content-type: text/markdown; charset=utf-8 and Vary: Accept.

How agents find it#

Every page Encited serves points at its Markdown twin in the head:

<link rel="alternate" type="text/markdown" href="/pricing.md">

An agent that reads the head finds the Markdown without being told where to look.

Freshness#

The Markdown comes from the same snapshot as the HTML, so the two always agree and both follow the page's refresh rule. When a page re-renders, its Markdown follows.

A page that answers 404 answers 404 in Markdown too, with the status on the response rather than a 200 carrying an error message.

If you run your own middleware#

Middleware and edge integrations forward a page URL to Encited, so the visitor's request never reaches us directly. Two ways to support Markdown:

Approach What to change
Forward the path When the visitor asks for Markdown, add .md to the URL you forward
Forward the header Pass the visitor's Accept header through with your request

The first needs no header handling and is the smaller change.

Signed responses#

On plans with response signing, Markdown is signed the same as HTML: same headers, same components, same secret. See Verifying response signatures.

Verify the response you received rather than re-fetching the path. One path serves HTML or Markdown depending on the Accept header, and the two bodies have different digests.

Fixes by symptom#

Symptom What to do
Every request returns HTML Check the Accept header reaching Encited. Through middleware it is your server's header, not the visitor's
.md returns your site's 404 The page has no snapshot yet. Open Inspect & Optimize → Pre-rendering and confirm it is cached
Markdown looks out of date It follows the page's refresh rule. Re-render the page to update both formats now
A real .md file on your site stopped working It did not. Encited passes a request through untouched when your site serves a file at that path

FAQ#

Does serving Markdown use a render? No. It comes from the snapshot the page already has, so it costs nothing extra.

Can I get Markdown for a page that isn't in my sitemap? Only if it has a snapshot. Markdown is derived from a rendered page, never rendered separately.

Does the crawl log show which format a bot got? Yes. The Served column reads Markdown or HTML on every visit.

What about very large pages? Pages past a size limit are served as HTML.