HTTP endpoints

Use when you need published URL patterns, search.json shape, or platform API routes.

URL patterns

File path to page URL

Every page URL mirrors its path under docs/:

FileLive URL
docs/index.mdx/
docs/next-steps.mdx/next-steps
docs/guides/setup/index.mdx/guides/setup

Nested directories become nested URL paths. A file named index.mdx inside a folder serves that folder's path.

Production URLs

Production URLs serve content from the repository default branch.

text
https://docs.page/{owner}/{repo}
https://docs.page/{owner}/{repo}/{page-path}

Ref URLs

Append ~{ref} immediately after the repository name to serve a branch, commit, or pull request:

text
https://docs.page/{owner}/{repo}~{ref}
https://docs.page/{owner}/{repo}~{ref}/{page-path}
Ref segmentResolves to
~feature-docsBranch feature-docs
~abc123… (40-character SHA)That commit
~42Pull request #42 head branch

Alternate hosts

Host typeURL pattern
Defaulthttps://docs.page/{owner}/{repo}[~{ref}]/{page-path}
Vanity subdomainhttps://{owner}.docs.page/{repo}[~{ref}]/{page-path}
Custom domainhttps://{domain}[~{ref}]/{page-path}

On vanity subdomains and custom domains, the owner and repository segments drop from the path. Ref segments work the same way.

See Branch preview, Vanity subdomains, and Custom domains.


Documentation pages

RouteMethodReturns
/{owner}/{repo}/{page-path}GETRendered documentation site (HTML)
/{owner}/{repo}~{ref}/{page-path}GETBranch, commit, or pull request preview

{page-path} matches the file path under docs/ without the extension, for example docs/getting-started.mdx/getting-started.

Raw markdown

Append .md or .mdx to any page path to fetch the source file from GitHub as plain text. Same content as View markdown in the page action menu.

RouteMethodReturns
/{owner}/{repo}/{page-path}.mdGETRaw .md or .mdx source for one page
/{owner}/{repo}/{page-path}.mdxGETSame as .md; either suffix resolves the source file
/{owner}/{repo}.mdGETRaw source for the site root page (docs/index.mdx or equivalent)
text
https://docs.page/acme/handbook/getting-started.md
https://docs.page/acme/handbook~feature-branch/authentication.md

Responses use Content-Type: text/markdown; charset=utf-8. Prefer site-wide llms.txt for catalog discovery; use raw markdown URLs for a single page.

Agent exports

RouteMethodReturns
/{owner}/{repo}/llms.txtGETMarkdown index of all pages
/{owner}/{repo}/llms-full.txtGETMarkdown export with full MDX source per page
/{owner}/{repo}/mcpGET, POSTMCP server descriptor and streamable HTTP MCP session

See llms.txt and MCP server. When mcp.enabled is false, the MCP route returns 404.

Search and discovery

RouteMethodReturns
/{owner}/{repo}/search.jsonGETJSON search index for on-site search
/{owner}/{repo}/sitemap.xmlGETXML sitemap for crawlers
/{owner}/{repo}/robots.txtGETCrawler directives

See Search and Search engine indexing.

search.json

Built on each request from MDX files under docs/ at the same ref as the page view.

Top-level

FieldTypeDescription
version4Index format version
documentsarraySearchable page entries
metaobjectRef and indexing metadata

Document entry

FieldTypeDescription
pathstringRoot-relative URL path
titlestringFrom frontmatter title or the first heading in the file
contentstringPlain text stripped from the MDX body

meta object

FieldTypeDescription
resolvedRefstringResolved Git ref
resolvedShastringCommit SHA for the ref
fileCountnumberIndexed document count
truncatedbooleanWhether the repository tree was truncated during indexing

Pages with empty bodies are omitted from documents.

See also