Skip to content

[#1154] Replace legacy ForgeRock relative links in the guides with Antora xrefs - #1158

Merged
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:issue-1154-legacy-links
Oct 1, 2026
Merged

vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:issue-1154-legacy-links

Conversation

@vharseko

Copy link
Copy Markdown
Member

Fixes #1154

About 30 relative links in the guides pointed to the old ForgeRock documentation layout and resolve to 404 on https://doc.openidentityplatform.org. They now point at the matching pages of this documentation set.

Changes

  • link:../../../docs/openam/13/… and link:../../../openam/13/… in the Web and Java EE agent guides → xrefs to the matching Administration / Installation Guide chapters and anchors. Two anchors no longer exist and are mapped to their closest current sections:
    • wildcard-syntax → chap-authz-policy.adoc#policy-patterns-wildcards
    • configure-authz-policy / chap-authz-policy → chap-authz-policy.adoc#configure-policies-with-console
  • link:../../../openam-web-policy-agents/… / link:../../../openam-jee-policy-agents/… → xref:../web-users-guide/index.adoc[…] / xref:../jee-users-guide/index.adoc[…]; the #configure-web-policy-agent link goes to web-users-guide/chap-web-agents.adoc.
  • link:../../../openam/admin-guide/chap-cdsso → xref:../admin-guide/chap-cdsso.adoc#chap-cdsso[…]. In chap-apache-tomcat.adoc the "Configuring Policies" link also pointed at the CDSSO chapter; it now points at the policy section.
  • xref:./chap-jee-agent-config.adoc#… in chap-apache-tomcat.adoc and chap-jetty.adoc → xref:chap-jee-agent-config.adoc#…: AntoraMojo turned the ./ form into xref:.:chap-….

The xrefs use the form already used across the guides, xref:../<guide>/<chapter>.adoc#<id>[…], which AntoraMojo rewrites to xref:<guide>:<chapter>.adoc#<id>[…]. window=\_blank is dropped from these links, since they now stay within the site, and the link texts follow the target headings.

Verification

  • No link:../../ or xref:./ links remain in the guide sources.
  • All 268 xrefs in the changed files resolve: the target file exists and declares the anchor.
  • mvn -P man-pages package in openam-doc-source succeeds; the Antora output contains the rewritten links (e.g. xref:admin-guide:chap-cdsso.adoc#chap-cdsso[), all nine PDFs build, and asciidoctor reports no warnings.

Not in scope: about 20 link:../<guide>/index.html#<anchor> links (dev-guide, reference, jee-users-guide) open the guide's index page on the site rather than the anchored section; they can be handled separately.

…n the guides with Antora xrefs

- Point the docs/openam/13 and openam/13 links in the agent guides at the
  matching chapters and anchors of this documentation set
- Point the openam-web-policy-agents / openam-jee-policy-agents links at the
  bundled Web and Java EE Policy Agent guides
- Fix the "Configuring Policies" link in the Tomcat chapter, which pointed
  at the CDSSO chapter
- Write the chap-jee-agent-config xrefs without the ./ prefix, which the
  Antora converter turned into an invalid module reference

Fixes OpenIdentityPlatform#1154
@vharseko vharseko added bug documentation Documentation, README, or javadoc labels Sep 30, 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: Every legacy relative link in the guides now stays within this documentation set.

  • No link:../../ and no xref:./ remain under openam-documentation/openam-doc-source/src/main/asciidoc at the head.
  • The "Configuring Policies" link in jee-users-guide/chap-apache-tomcat.adoc:31, which pointed at the CDSSO chapter, now targets admin-guide/chap-authz-policy.adoc#configure-policies-with-console.

@vharseko
vharseko merged commit a9516e8 into OpenIdentityPlatform:master Oct 1, 2026
16 checks passed
@vharseko
vharseko deleted the issue-1154-legacy-links branch October 1, 2026 11:35
vharseko added a commit to OpenIdentityPlatform/doc.openidentityplatform.org that referenced this pull request Oct 2, 2026
… Sitemap line (#38)

Fixes #36
Fixes #37

**Stacked on #28.** Both issues extend the `Build` workflow and the
baseline check that #28 adds, so this branch carries the commits of #28
(its current head, a2c1a17). Only the commits after it are this change;
the branch will be rebased onto `master` once #28 is merged.

## #36: anchors of links
- **`build.yml`**: lychee runs with `--include-fragments`.
- **`.github/build-baseline/broken-links.jq`** (new): the broken links
of the lychee report as `page <TAB> link`, used by both `check.sh` and
the job summary. It drops a `Cannot find fragment` whose anchor is the
name of the target page itself
(`chap-resource-conf#chap-resource-conf`): Antora renders the page title
without an id, so the browser opens the top of the page, which is where
the link points anyway. lychee's regular expressions have no back
references, so this is done on the JSON report, as proposed in #36.
- The job summary lists and counts each page/link pair once, as
`check.sh` does, and shows how many links were left out: `N checked, M
broken (K more point to the top of their target page).` (K counts
occurrences, as lychee's `errors` does.)
- **Self-test**: with empty known lists, `check.sh` must pass a link to
the top of its target page, and must exit 1 with a `New broken links`
annotation on a broken anchor and on a missing page linked at its own id
(`d/b.html#b` as `Cannot find file`).
- **`broken-links.txt`**: 35 broken anchors are added with `check.sh
--update`: the 37 listed in #36 but the two
`.:chap-jee-agent-config.adoc` ones, which
OpenIdentityPlatform/OpenAM#1158 has fixed on `master`. The 10 known
links of #28 are unchanged. Reporting them in the product repositories
is not done yet, it follows separately.

## #37: head meta tags and the robots.txt Sitemap line
**`.github/build-baseline/head-meta.sh <site>`** (new), run as a new
last step, also when the comparison with the known problems fails, so
that one run reports both. It fails when:
- `robots.txt` has no line `Sitemap: <site.url>/sitemap.xml`, `site.url`
read from `antora-playbook.yml`, or `sitemap.xml` is missing;
- a page carries other than exactly one each of `<meta
name="description"`, `og:title`, `og:description`, `og:image`,
`twitter:card`, `og:url`; `og:url` is not required on `404.html`.
Redirect pages (`<meta http-equiv="refresh"`, as Antora writes them) and
the API docs copied by `npm run copyApiDocs` (the same paths as the link
check excludes) are skipped.

Problems go to the job summary and as error annotations. A self-test
step feeds the script a test site with an empty `robots.txt`, no
`sitemap.xml`, a redirect page and a page without `og:image`, with
`twitter:card` twice, that quotes a refresh tag, and requires exactly
those four problems.

## Verification
On a local build of this branch, with the commands of the workflow:
- lychee with `--include-fragments`: 382 distinct broken anchors, of
which 347 to the page itself and the 35 above; `check.sh`: 0 new, 0 no
longer found; the job summary: 45 broken, 45 rows;
- both self-test steps pass, and fail against each of 12 mutants: in
`broken-links.jq` the status guard replaced by `true`, no filter, every
fragment error dropped, the whole path compared, no `rtrimstr`;
`check.sh` exiting on the new-entry path before the annotation; in
`head-meta.sh` the tag count check deleted, `-eq 1` → `-ge 0`, a loose
`http-equiv="refresh"` match, the robots.txt or the sitemap.xml check
deleted, always exit 0;
- `head-meta.sh build/site`: 285 pages checked, 0 problems.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: fix legacy ForgeRock relative links

2 participants