fix(home): guard ADP home links on site-adp-enabled (stop agentic-data-plane xref errors in non-ADP builds)#188
Conversation
… don't error
The shared home page (how-to-use-these-docs.adoc) links to
xref:agentic-data-plane:home:index.adoc unconditionally. Every build that
aggregates docs-site/home but NOT the adp-docs component — the 25.x docs
branches and the per-repo previews (docs main, cloud-docs, rp-connect-docs) —
logs `ERROR (asciidoctor): target of xref not found: agentic-data-plane:...`.
The gating attribute `site-adp-enabled` already existed but was never honored
by the page. This wires it up:
- home/antora.yml: default site-adp-enabled to 'false' (component-level, always
defined) so ADP-less builds hide the links instead of erroring.
- how-to-use-these-docs.adoc: guard the two ADP xref blocks with
`ifeval::["{site-adp-enabled}" == "true"]`.
- antora-playbook.yml / preview / local: set site-adp-enabled 'true' (these
aggregate adp-docs), so production and preview home still render ADP.
Verified the guard toggles via asciidoctor: false/undefined -> ADP xrefs hidden,
true -> shown.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for redpanda-documentation ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
cc: @JakeSCahill |
Review: ADP home xref guardThe conditional wiring is correct and safe. The CriticalNone. Suggestions
|

Why this PR is needed
The shared home page
home/modules/ROOT/pages/how-to-use-these-docs.adoclinks to the Agentic Data Plane docs with an unconditional xref:The
agentic-data-planecomponent is published only by the adp-docs repo. Any Antora build that aggregatesdocs-site/homebut not adp-docs therefore can't resolve those xrefs and logs:That hits every build that doesn't include adp-docs:
main, cloud-docs, rp-connect-docs — which pull the shared home but don't aggregate adp-docs.Only the full production/component builds (which do aggregate adp-docs) resolve it today. The error is non-fatal but pollutes every one of those previews.
A gating attribute,
site-adp-enabled, already existed inantora-playbook.yml— but no page ever referenced it, so it had no effect. This PR finishes that wiring.What this PR changes
home/antora.ymlsite-adp-enabled: 'false'home/modules/ROOT/pages/how-to-use-these-docs.adocifeval::["{site-adp-enabled}" == "true"]antora-playbook.yml(production)site-adp-enabled: 'false'→'true'preview-antora-playbook.ymlsite-adp-enabled: 'true'local-antora-playbook.ymlsite-adp-enabled: 'true'Net: ADP renders wherever the
adp-docscomponent is aggregated (production, preview, local — unchanged), and is cleanly omitted, with no error, everywhere it's absent (25.x branches and all per-repo previews).Verification
Guard logic proven locally with asciidoctor:
site-adp-enabledfalsetrueThis PR's preview uses
preview-antora-playbook.yml(aggregates adp-docs → mirrors production). Confirm both:/home/how-to-use-these-docspage (the "Agentic Data Plane (ADP)" bullet and the "I want to build AI agent infrastructure" path are present) → proves no live ADP content disappears.ERROR (asciidoctor): target of xref not found: agentic-data-planein this preview's deploy log.If both hold, it's safe to merge. After merge, the 25.x branches and other previews clear the error on their next build. If either fails (e.g., the playbook
'true'doesn't override the component'false'), it surfaces here in the preview — not in production.🤖 Generated with Claude Code