Guide

Markdown for Agents troubleshooting

Recurring Markdown and /llms.txt failures.

Guided diagnosis

Markdown URL problems

Narrow down 404s and empty conversion.
Question 1
Question 1

Does the post URL return HTML when published?

.md URLs return 404

Cause: Post type lacks prc-markdown-for-agents support, or the post is not published.
Fix: Opt the type in on init and confirm publish status.

Canonical URL ignores Accept: text/markdown

Cause: Accept negotiation is disabled by default.
Fix: Agents should use rel="alternate".md / /markdown. Re-enable only after PRC-466 is resolved:

define( 'PRC_MARKDOWN_FOR_AGENTS_ENABLE_ACCEPT_NEGOTIATION', true );

Purge VIP edge cache after enabling.

Authors show “Pew Research Center”

Cause: prc-staff-bylines inactive or no bylines; WP user fallback empty.
Fix: Activate bylines and assign them, or filter prc_markdown_for_agents_authors.

HTML conversion strips formatting

Cause: Generic HTML → Markdown fallback cannot parse some structures.
Fix: Register a block-specific callback via Block_Markdown_Registry::register().

Was this helpful?