Skip to content

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 }}" --llms
  • Keep (or add) Article/BlogPosting JSON-LD or og:type=article on post pages. That’s how agentprose and agentprose build tell posts from listings.
  • If the wrong element is picked as the article body, set data-content=".post-body"; strip boxes with data-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/.