Skip to content

fix(home): guard ADP home links on site-adp-enabled (stop agentic-data-plane xref errors in non-ADP builds)#188

Merged
Feediver1 merged 2 commits into
mainfrom
fix-adp-home-xref-guard
Jun 25, 2026
Merged

fix(home): guard ADP home links on site-adp-enabled (stop agentic-data-plane xref errors in non-ADP builds)#188
Feediver1 merged 2 commits into
mainfrom
fix-adp-home-xref-guard

Conversation

@Feediver1

@Feediver1 Feediver1 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Why this PR is needed

The shared home page home/modules/ROOT/pages/how-to-use-these-docs.adoc links to the Agentic Data Plane docs with an unconditional xref:

* xref:agentic-data-plane:home:index.adoc[Agentic Data Plane (ADP)]: AI agent infrastructure
...
* xref:agentic-data-plane:home:index.adoc[Get started with ADP]

The agentic-data-plane component is published only by the adp-docs repo. Any Antora build that aggregates docs-site/home but not adp-docs therefore can't resolve those xrefs and logs:

ERROR (asciidoctor): target of xref not found: agentic-data-plane:home:index.adoc
  file: home/modules/ROOT/pages/how-to-use-these-docs.adoc
  source: https://github.com/redpanda-data/docs-site (branch: main | start path: home)

That hits every build that doesn't include adp-docs:

  • All 25.x docs branches (ADP went GA on 2026-06-15, so 25.x predates it and must not surface ADP).
  • Every per-repo preview — 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 in antora-playbook.yml — but no page ever referenced it, so it had no effect. This PR finishes that wiring.

What this PR changes

File Change Effect
home/antora.yml Add component-level default site-adp-enabled: 'false' Attribute is always defined, so ADP-less builds hide the links instead of erroring (no undefined-attribute issues)
home/modules/ROOT/pages/how-to-use-these-docs.adoc Wrap both ADP xref blocks in ifeval::["{site-adp-enabled}" == "true"] Links render only when ADP is enabled
antora-playbook.yml (production) site-adp-enabled: 'false''true' Live production home keeps showing ADP — no existing content disappears
preview-antora-playbook.yml Add site-adp-enabled: 'true' This PR's deploy preview mirrors production
local-antora-playbook.yml Add site-adp-enabled: 'true' Local dev builds render ADP

Net: ADP renders wherever the adp-docs component 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-enabled result
false both ADP xrefs hidden ✅
true both ADP xrefs shown ✅
undefined hidden, no crash ✅

⚠️ Verify on this preview before merging

This PR's preview uses preview-antora-playbook.yml (aggregates adp-docs → mirrors production). Confirm both:

  1. ADP still renders on the preview's /home/how-to-use-these-docs page (the "Agentic Data Plane (ADP)" bullet and the "I want to build AI agent infrastructure" path are present) → proves no live ADP content disappears.
  2. No ERROR (asciidoctor): target of xref not found: agentic-data-plane in 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

… 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>
@Feediver1 Feediver1 requested a review from a team as a code owner June 25, 2026 14:46
@netlify

netlify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Deploy Preview for redpanda-documentation ready!

Name Link
🔨 Latest commit 4e95aa3
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-documentation/deploys/6a3d468f01433400088e5c85
😎 Deploy Preview https://deploy-preview-188--redpanda-documentation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 70 (🔴 down 12 from production)
Accessibility: 92 (🔴 down 2 from production)
Best Practices: 92 (no change from production)
SEO: 83 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@Feediver1

Copy link
Copy Markdown
Contributor Author

cc: @JakeSCahill

@micheleRP

Copy link
Copy Markdown
Contributor

Review: ADP home xref guard

The conditional wiring is correct and safe. The ifeval guards are block-level and syntactically valid, the component-level site-adp-enabled: 'false' default means any build that forgets to opt in hides ADP rather than breaking, and the playbook 'true' values correctly override the component default (playbook attributes without a trailing @ are hard-set and win over the component descriptor). how-to-use-these-docs.adoc is the only home page with literal xref:agentic-data-plane: macros, so the asciidoctor error is fully addressed.

Critical

None.

Suggestions

  1. [follow-up] home/modules/ROOT/pages/index.adoc still surfaces ADP content unguarded — out of scope for this PR, but needs the same treatment to honor "no ADP in backports."

    This PR removes the ADP xref error and the two ADP links in how-to-use-these-docs.adoc. But the home landing page index.adoc carries far more ADP content, none of it behind site-adp-enabled:

    • L8 — hero subtitle: "the two platforms that power Redpanda…"
    • L20–23 — "Build agentic data flows" intent card (title/desc/tags/CTA)
    • L27, L36–37 — "Agentic Data Plane" product card
    • L47–48 — page-adp-quickstart / page-adp-docsagentic-data-plane:... (dead targets in a non-ADP build)
    • L3, L4, L50, L56–57 — page-expand-buckets: agentic-data-plane, meta description, and FAQ Q1/Q4 describe Redpanda as an Agentic Data Plane

    These are template-driven attributes, not xref: macros, so they produce no asciidoctor error (which is why they're invisible to the fix here) — but they still render ADP into the page. If 25.x/backport builds aggregate the home component, this content leaks into versions that predate ADP GA.

    Recommend a follow-up PR/ticket to guard these in index.adoc (same ifeval pattern, or template-level component-existence checks). The follow-up should first confirm whether the home landing page is actually rendered in backport/non-ADP builds, and whether the home UI template already hides ADP sections when the component is absent.

@Feediver1 Feediver1 merged commit 7c5a306 into main Jun 25, 2026
5 checks passed
@Feediver1 Feediver1 deleted the fix-adp-home-xref-guard branch June 25, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants