Skip to content

Validate generated Antora page titles - #1259

Merged
vharseko merged 2 commits into
OpenIdentityPlatform:masterfrom
vharseko:docs/validate-antora-page-titles
Nov 28, 2026
Merged

vharseko merged 2 commits into
OpenIdentityPlatform:masterfrom
vharseko:docs/validate-antora-page-titles

Conversation

@vharseko

@vharseko vharseko commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Validate every generated Antora page during Maven verification. Require a document header and a nonblank title from a single parse, support headers supplied by ROOT partials, and report the path of each untitled page.
  • Restore the Antora titles of Get Started with OpenAM and Quick Start Guide while preserving all 29 published article anchors, including _get_started_with_openam and _quick_start_guide.
  • Follow Document phpLDAPadmin Docker setup and delegated access OpenDJ#1342.

Verification

  • Ran all seven AntoraPageTitlesIT tests with Maven on JDK 11. The tests passed, covering the scan of 163 generated pages, title overrides with conditional or missing headers, and both restored anchors.
  • Built the generated sources with Antora 3.1.15 and verified both headings and browser titles. Compared the rendered articles with the published pages and confirmed that all 29 published IDs remain present and each restored ID occurs once.

@vharseko
vharseko requested a review from maximthomas November 28, 2026 10:29
@vharseko vharseko added bug documentation Documentation, README, or javadoc java Pull requests that update java code tests Test suite: coverage, fixtures, or test infrastructure labels Nov 28, 2026

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The title scan reports both affected paths together on the base revision and passes all 163 generated pages at HEAD.


issue (blocking): Preserve the two published heading fragments when promoting the headings to document titles.

chap-first-steps.adoc:18, quick-start-guide.adoc:17

Antora generates the clickable heading IDs _get_started_with_openam and _quick_start_guide on the pinned base. The new :table-caption!: entries cause the generator to offset the top heading into a document title, leaving both fragment URLs without a target at HEAD. Add a compatibility anchor for the old ID in each existing env-site block and assert that both IDs occur once in the rendered articles alongside the corrected titles. An independent Antora build confirmed that these aliases preserve all 29 previous article IDs. published Getting Started fragment, published Quick Start fragment.

Fragment ID               Live  Base  HEAD  HEAD with alias
_get_started_with_openam     1     1     0                1
_quick_start_guide           1     1     0                1

suggestion (non-blocking): Check the header of the original parse when a page declares :title:.

AntoraPageTitlesIT.java:59

The second parse unsets title, which can change whether the header is present. A fixture with an ifdef::title[] heading publishes a title in Antora and fails the gate. An ifndef::title[] heading gives the inverse result. Check for a real header and a nonblank title on the original parse. These fixtures cover future authoring syntax.

Heading condition   Antora document title  Gate result
ifdef::title[]      Browser Title         Rejected
ifndef::title[]     None                  Accepted

@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas I addressed both findings in c78244a77b.

  • Restored both published heading IDs in the existing env-site blocks. Antora 3.1.15 renders each ID exactly once alongside the corrected title, and the two articles retain all 29 published IDs.
  • The title gate now checks for a document header and a nonblank title on the original parse. Added regression cases for ifdef::title[], ifndef::title[], and a :title: override with and without a header.

All seven AntoraPageTitlesIT tests passed on JDK 11, including the scan of all 163 generated pages.

@vharseko
vharseko requested a review from maximthomas November 28, 2026 11:53

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Both articles now render their corrected titles and all 29 previously published article IDs.

@vharseko
vharseko merged commit 34f1199 into OpenIdentityPlatform:master Nov 28, 2026
16 checks passed
@vharseko
vharseko deleted the docs/validate-antora-page-titles branch November 28, 2026 14:26
vharseko pushed a commit to OpenIdentityPlatform/commons that referenced this pull request Nov 28, 2026
## Summary

- Validate generated AsciiDoc page titles at the end of the `antora`
goal and report all pages missing a document title.
- Parse headers with `env-site` set, resolve `ROOT:partial$` includes,
and preserve `:title:` overrides when a document header is present.
- Cover pages with only a section heading or title attribute, plus a
header conditional on `:title:`.

## Testing

- `mvn -o -pl commons/doc-maven-plugin -am -Dmaven.javadoc.skip=true
install` passed on JDK 17 with 553 tests.
- Ran Antora generation with the updated plugin against the OpenIG,
OpenAM, OpenIDM, and OpenDJ PR sources. The OpenDJ run used locally
generated man-page partials. [OpenIG
#201](OpenIdentityPlatform/OpenIG#201), [OpenAM
#1259](OpenIdentityPlatform/OpenAM#1259),
[OpenIDM
#281](OpenIdentityPlatform/OpenIDM#281), [OpenDJ
#1342](OpenIdentityPlatform/OpenDJ#1342).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug documentation Documentation, README, or javadoc java Pull requests that update java code tests Test suite: coverage, fixtures, or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants