[#22] Link API docs (Javadoc) from the start page and the Projects menu - #30
Conversation
maximthomas
left a comment
There was a problem hiding this comment.
praise: The links point exactly where the Javadoc copies land, and the menu entry reuses the existing URL helper.
- all six
<dir>/apidocs/index.htmltargets exist at the head, andcopyApiDocs(package.json:7) copies them to the matching/<dir>/apidocs/index.htmlsite paths, so OpenICF and Commons get their first link (ROOT/modules/ROOT/pages/index.adoc:82-83) - the Projects-menu entry goes through
relativize (resolvePageURL 'ROOT::index.adoc')like the four product entries above it (supplemental-ui/partials/header-content.hbs:49), and the start page renders<h2 id="api-reference">forindex.adoc:70-71
suggestion (non-blocking): Nothing fails the build if the new apidocs links or the #api-reference anchor break.
ROOT/modules/ROOT/pages/index.adoc:70, :28, :44, :54, :67, :75-83; supplemental-ui/partials/header-content.hbs:49; package.json:7
Antora resolves neither link: targets nor the fragment in the hbs href, and the only workflow, .github/workflows/publish.yml, runs npm run buildAll on push to master with no link check. Two changes keep the build green and ship a broken link: renaming [#api-reference] (the menu entry then lands at the top of the start page), and cp -R ./openicf/apidocs build/site/openicf in copyApiDocs (/openicf/apidocs/index.html returns 404). The gap predates this PR; the links are correct today.
# a step after `npm run buildAll` in a pull_request job
- run: |
grep -q 'id="api-reference"' build/site/index.html
for d in opendj openam openig openidm openicf commons; do
test -f "build/site/$d/apidocs/index.html"
donePin: the grep turns red on the anchor rename, the test -f on the moved openicf copy. Or: if #28 lands, its lychee gate (--root-dir /site, run after copyApiDocs) already catches the moved copy; the anchor still needs the grep, since that gate runs without --include-fragments.
issue (non-blocking): The new CDDL header's only ownership line is a "Portions Copyright", with no original copyright line.
ROOT/modules/ROOT/pages/index.adoc:1-15
"Portions" presupposes an original Copyright line above it; every other CDDL-headed file in the repository has one (e.g. Copyright 2015 ForgeRock AS. followed by Portions Copyright 2024-2026 3A Systems LLC.). This page was created in this repository in 2024 (735ee41), and no other ROOT page carries a header, so the block names no holder for the existing content. Neither the description nor the commit message mentions the header; rendering is unaffected.
-////
-The contents of this file are subject to the terms of the Common Development and
-...
-Portions Copyright 2026 3A Systems, LLC.
-////
= Open Identity Platform DocumentationOr: keep the header with an original line for the existing content, e.g. Copyright 2024-2026 3A Systems LLC., if 3A Systems holds it.
- index.adoc: an "API Reference (Javadoc)" link in each product section, and an "API Reference (Javadoc)" section listing the four products and the OpenICF and Commons libraries, whose Javadoc was reachable only by URL - header-content.hbs: an "API Reference (Javadoc)" entry in the Projects menu, pointing to that section Fixes OpenIdentityPlatform#22
The page had no header, and no other ROOT page has one; the header also pointed to legal/CDDLv1.0.txt, which this repository does not have.
0c22298 to
6b2c620
Compare
|
Re: CI check for the apidocs links and
Re: the CDDL header — agreed; removed in 6b2c620. The page had no header, and no other ROOT page has one; the header also points to The branch is also rebased onto the current |
maximthomas
left a comment
There was a problem hiding this comment.
praise: The rebased head matches the description, and both entry points lead to the same section.
- The CDDL header block is gone from
ROOT/modules/ROOT/pages/index.adoc, so the page again starts at its doctitle and the diff stays within the stated scope. supplemental-ui/partials/header-content.hbs:49uses the samerelativize (resolvePageURL 'ROOT::index.adoc')call as the four Projects entries at:45-47. Its#api-referencefragment matches[#api-reference]atROOT/modules/ROOT/pages/index.adoc:55.- All six targets linked from the start page (
opendj,openam,openig,openidm,openicf,commons/apidocs/index.html) exist in the head tree.
…wler (#33) Fixes #25, together with #28 — this PR does item 5, the migration to the current DocSearch; items 1–4 are #28. The front end moves now, on the existing index; the crawler stays the legacy scraper until Algolia Crawler access is set up, for which this PR prepares the configuration. ## Changes - **Front end: `@docsearch/js` 3.9.0** instead of `docsearch.js` 2 (vendored as before, `supplemental-ui/js/vendor/docsearch.min.js` and `supplemental-ui/css/vendor/docsearch.min.css`): - the header shows the DocSearch button, which opens the search modal; shortcuts `Ctrl/Cmd+K` and `/`; - same application, key and index (`doc_openidentityplatform`): the records of the legacy scraper carry the fields the v3 front end reads (`hierarchy.lvl0–6`, `content`, `type`, `url`), so no reindexing is needed; - `transformItems` drops the `#cookie-notice` anchor that the legacy scraper gives to page titles and to the text before the first section (the first id on the page, the cookie notice); - rendered only when the build has both `ALGOLIA_SEARCH_API_KEY` and `ALGOLIA_APP_ID` (the v3 client requires `appId`); otherwise the `SITE_SEARCH_PROVIDER` branch (plain search input), which is kept, or no search. 3.9.0 is the last 3.x; 4.x and 5.x add Ask AI and a side panel, which this site does not use, and are 4–5 times larger (510 KB and 619 KB of JS against 133 KB). - **`docsearch/crawler-config.js`** (new): the same crawl for the [Algolia Crawler](https://www.algolia.com/doc/tools/crawler/) — records only from the product pages, as the `start_urls` of `config.json` (the site home page is crawled for links only), the same exclusions (API docs, generated references, and the older versions of #31) and the same selectors for the hierarchy and the content. Not carried over, because none of it changes the results: the version in lvl0 and the `desc(version)` ranking (every component has `version: ~`), the `component` attribute (nothing reads it) and `min_indexed_level`. It writes a new index, `doc_openidentityplatform_v3`, so the live search is not affected while it is checked. **Not run yet**: it needs Crawler access on the Algolia application (for an open-source site, through the DocSearch program). - **`docsearch/readme.md`**: how the search is set up, and the steps to move to the Crawler. The link it held before (how the index was set up for the legacy scraper) is kept. `publish.yml` and `config.json` are unchanged: the legacy scraper keeps reindexing after every deployment. ## Verification Local build with the public search key of the site, checked in a browser (Playwright): - the DocSearch button is rendered in the header, no console errors; - `Ctrl+K` opens the modal; "session" and "replication" return results from the live index, grouped by product; page titles link to the page with no anchor, and no result URL ends with `#cookie-notice` (in the live index every page-title record does); - a build with only `ALGOLIA_SEARCH_API_KEY` has neither the button nor the DocSearch bundle; - the `pathsToMatch` pattern of `crawler-config.js`, checked with micromatch, matches `/openam` and `/openam/` but not `/`, `/openicf/…` or `/commons/…`; - rebased onto `master` (with #29); merges with #30 and #32 without conflicts (`git merge-tree`).
…leaseversion (#32) Fixes #23 ## Changes - **`ROOT/modules/ROOT/pages/index.adoc`** (start page): under the description of each product, a line with - a shields.io badge of the latest release (e.g. *latest release v16.1.3* for OpenAM), linking to `releases/latest`; - *Releases and downloads* → `github.com/OpenIdentityPlatform/<Product>/releases`; - *Docker images* → `hub.docker.com/r/openidentityplatform/<product>`; - *Security advisories* → `…/security/advisories` for OpenAM, OpenDJ and OpenIDM (OpenIG has no published advisories, so no link). - **`supplemental-ui/partials/header-content.hbs`**: a **Downloads** menu next to Projects, with the release pages of the four products, the Docker Hub organization and the security advisories of OpenDJ, OpenAM and OpenIDM. - **`openig/antora.yml`**: `releaseversion: 5.2.4` removed — no page or UI template uses it (checked in the sources and in the generated site). - **CDDL headers** added to `index.adoc` and `openig/antora.yml` with `Copyright 2024-2026 3A Systems, LLC.`: neither file had a copyright holder before, so this is the same line as `antora-playbook.yml` (#29), and the `openig/antora.yml` header is identical to the one in #31. `header-content.hbs` gets none: it overrides an antora-ui-default partial (MPL-2.0). No version number is written as text: the badge always shows the current release, and the version menus from #31 show the current line (16.x, 5.x, 7.x, 6.x) and the older versions. ## Verification Local Antora build of this branch: - all external links on the start page and in the header return 200; the badge is served as `image/svg+xml`; - the Downloads menu is present on every page (checked on the start page and `openam/admin-guide`); - no new Antora errors; - rebased onto `master` after #29 and #30; the start page keeps the *API Reference (Javadoc)* items from #30 next to the new links. No conflicts with the other open pull requests (`git merge-tree`): `openig/antora.yml` with #31, `header-content.hbs` with #33.
Fixes #22
Changes
ROOT/modules/ROOT/pages/index.adoc(start page):#api-reference) with Products (OpenDJ, OpenAM, OpenIG, OpenIDM) and Libraries: OpenICF and Commons, whose Javadoc was reachable only by URL.The links are root-relative (
/openam/apidocs/index.html), because the Javadoc is not an Antora page but is copied into the site bynpm run copyApiDocs.supplemental-ui/partials/header-content.hbs: a divider and an "API Reference (Javadoc)" entry in the Projects menu, pointing to that section.Component navigation is not changed: the product release workflows replace
<product>/modules(rm -rf) on every docs upload, so an entry added there in this repository would be lost; it would have to come from the product repositories.Verification
Local Antora build of this branch (with
copyApiDocs):openam,opendj,openidm,openig,openicf,commons/apidocs/index.html) exist in the generated site;./#api-referenceon the start page and../../#api-referenceonopenam/admin-guide/;lychee --offline: no broken link on the start page; the site total is unchanged (45, all known and tracked);masterafter [#21] Fix broken JEE agent PDF link and malformed header markup #27 and Fix Dependabot alerts: pin js-yaml to 4.3.2 #35, without conflicts.In CI, a missing
<dir>/apidocs/index.htmltarget is caught by the lychee check of #28; a renamed#api-referenceanchor by its--include-fragmentsrun proposed in #36.