Static site generators
Static sites are agentprose’s home ground: themes already emit JSON-LD, OpenGraph, a feed and a sitemap, which agentprose reads without configuration. Add the tag to the shared layout, and optionally build an index after the site build.
Create layouts/partials/agentprose.html:
{{- /* agentprose: agent-readable content via WebMCP */ -}}<script src="https://cdn.jsdelivr.net/npm/agentprose@0/dist/agentprose.min.js" defer {{- with site.Params.newsletter }} data-subscribe="{{ . }}"{{ end }} {{- if ne (urls.Parse site.BaseURL).Path "/" }} data-base="{{ site.BaseURL }}"{{ end }}></script>Call it from your head partial:
{{ partial "agentprose.html" . }}Optional: index the built site in CI.
# .github/workflows/deploy.yml (excerpt)- run: hugo --minify- run: npx agentprose build public --base-url "${{ vars.SITE_URL }}" --llmsCreate _includes/agentprose.html and include it from _includes/head.html with {% include agentprose.html %}:
<script src="https://cdn.jsdelivr.net/npm/agentprose@0/dist/agentprose.min.js" defer {% if site.newsletter %}data-subscribe="{{ site.newsletter }}"{% endif %} {% if site.baseurl != '' %}data-base="{{ site.url }}{{ site.baseurl }}/"{% endif %}></script>For a prebuilt index:
bundle exec jekyll build && npx agentprose build _site --base-url https://example.com/In your base layout. is:inline keeps Astro from bundling the CDN script:
---const { title } = Astro.props;---<html lang="en"> <head> <meta charset="utf-8" /> <title>{title}</title> <script is:inline src="https://cdn.jsdelivr.net/npm/agentprose@0/dist/agentprose.min.js" defer data-subscribe="/newsletter"></script> </head> <body><slot /></body></html>If the site uses Pagefind (Starlight does), agentprose detects it and uses it for search_posts. Postbuild index in package.json:
{ "scripts": { "postbuild": "agentprose build dist --base-url https://example.com/" } }In _includes/base.njk:
<script src="https://cdn.jsdelivr.net/npm/agentprose@0/dist/agentprose.min.js" defer></script>In package.json:
{ "scripts": { "build": "eleventy", "postbuild": "agentprose build _site --base-url https://example.com/ --llms" } }<!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>My post</title> <link rel="alternate" type="application/rss+xml" href="/feed.xml"> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BlogPosting", "headline": "My post", "datePublished": "2026-10-17", "author": { "@type": "Person", "name": "Me" } } </script> <!-- The whole install: --> <script src="https://cdn.jsdelivr.net/npm/agentprose@0/dist/agentprose.min.js" defer data-subscribe="https://example.com/newsletter"></script></head><body> <article> <h1>My post</h1> <p>Agents can now read this, search the rest of the site and cite it.</p> </article></body></html>Make extraction reliable
Section titled “Make extraction reliable”- Keep (or add) Article/BlogPosting JSON-LD or
og:type=articleon post pages. That’s how agentprose andagentprose buildtell posts from listings. - If the wrong element is picked as the article body, set
data-content=".post-body"; strip boxes withdata-ignore=".newsletter-box,.toc". - If the blog lives under a sub-path, set
data-base(the Hugo and Jekyll partials above do it for you).
Other examples in the repository: examples/.