DocsPress

Documentation plugin for WordPress

Markdown versions and llms.txt

Updated
On this page

Every published article also exists as plain Markdown, and your site lists all of them in an llms.txt file. AI tools read these faster and more accurately than a full web page. Nothing needs to be turned on.

Markdown version of an article

Add ?docspress_format=markdown to the address of any article, product or collection:

https://example.com/docs/ghost-kit/get-started/installation/?docspress_format=markdown

A tool that sends the Accept: text/markdown header gets the Markdown at the normal address too.

The Markdown holds the title, the full text with headings, lists, tables, code and links that work from anywhere. A product or collection also lists the articles inside it.

Only published articles without a password have a Markdown version. Drafts, private and password protected articles return a 404 error.

Copy page button

Readers and you can get the Markdown from the article itself. The Copy page button under the title copies the article as Markdown. Its menu has Copy as Markdown and View as Markdown. Paste the text into an AI chat to ask questions about the page.

To hide the button, turn off Copy page button in the Help center block. See Help center templates and block settings.

llms.txt for the whole site

https://example.com/llms.txt lists every public article with a link to its Markdown version, under the site name and a Documentation heading. Give this address to an AI tool that should know your whole help center.

llms.txt for one product

Add llms.txt to a product’s address:

https://example.com/docs/ghost-kit/llms.txt

It lists that product’s public articles, the shared articles in its sidebar included.

What stays private

Product references never appear in the Markdown or in llms.txt.

Server requirement

Markdown needs the PHP DOM extension, which most hosts include. Without it, the Markdown addresses return the normal page.

Was this page helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *