Skip to content

fix: integrate all ocis helper changes into the docs - #119

Merged
mmattel merged 3 commits into
mainfrom
update_antora_to_use_ocis_helpers
Sep 10, 2026
Merged

mmattel merged 3 commits into
mainfrom
update_antora_to_use_ocis_helpers

Conversation

@mmattel

@mmattel mmattel commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

References: #117

This PR updates the versions to use the data created by the ocis_helper and other related cleanups.

Because of the unnoticed change from version next to a prerelease scheme during the mono-repo transition, a new extension was required to identify the prerelease tag as attribute that is not available in the standard Antora 3.2 release.

@mmattel
mmattel requested a review from a team as a code owner September 10, 2026 16:36
@mmattel mmattel added the documentation Improvements or additions to documentation label Sep 10, 2026
@mmattel
mmattel merged commit f363ad2 into main Sep 10, 2026
4 checks passed
@mmattel
mmattel deleted the update_antora_to_use_ocis_helpers branch September 10, 2026 16:51
LukasHirt added a commit that referenced this pull request Sep 17, 2026
#119 renamed test/ to extension-tests/ (and flattened test/helpers/
into extension-tests/) but left two things pointing at the old
layout: package.json's test script still globbed test/*.test.js (so
npm test silently ran zero tests, in CI too), and
latest-alias/next-alias/static-files.test.js still required
./helpers/latest-versions and latest-versions.js itself still walked
up two directories to find content/ instead of one. Net effect: most
of this suite has been dead since #119, always green because nothing
ran.

Found this while adding a guard test for the medium-zoom vendor sync
(next commit) and needed it to actually execute.

Signed-off-by: Lukas Hirt <info@hirt.cz>
LukasHirt added a commit that referenced this pull request Sep 17, 2026
#119 renamed test/ to extension-tests/ (and flattened test/helpers/
into extension-tests/) but left several things pointing at the old
layout: package.json's test script still globbed test/*.test.js (so
npm test silently ran zero tests, in CI too), latest-alias.test.js /
next-alias.test.js / static-files.test.js still required
./helpers/latest-versions, and latest-versions.js itself still walked
up two directories to find content/ instead of one. Net effect: most
of this suite has been dead since #119, always green because nothing
ran.

Signed-off-by: Lukas Hirt <info@hirt.cz>
LukasHirt added a commit that referenced this pull request Sep 18, 2026
* test: repair the extension-tests suite broken by the test/ rename

#119 renamed test/ to extension-tests/ (and flattened test/helpers/
into extension-tests/) but left several things pointing at the old
layout: package.json's test script still globbed test/*.test.js (so
npm test silently ran zero tests, in CI too), latest-alias.test.js /
next-alias.test.js / static-files.test.js still required
./helpers/latest-versions, and latest-versions.js itself still walked
up two directories to find content/ instead of one. Net effect: most
of this suite has been dead since #119, always green because nothing
ran.

Signed-off-by: Lukas Hirt <info@hirt.cz>

* test: don't flag unrendered content/ocis/8.0 as a broken page alias

Restoring npm test above turned this test back on, which surfaces it:
content/ocis/8.0 has a page-aliases entry but isn't in site.yml's ocis
source list (only 8.1-8.3 render; site.yml's own comment says an
unnamed version folder "could safely be deleted if outdated"). The
test walks the whole content/ tree, so it flagged that stale, never-
published version as a dangling alias. Skip versions this build
doesn't publish, matching the builtOrSkip pattern the rest of the
suite already uses; verified it still fails when a real published
stub (8.1) is removed.

Signed-off-by: Lukas Hirt <info@hirt.cz>

* feat: re-add mediumzoom as a tracked npm dependency (#133)

* feat: re-add mediumzoom as a tracked npm dependency

The previous vendored copy of medium-zoom.min.js was reverted (#131)
for missing dependency management. Install medium-zoom via npm so it
is tracked in package.json/package-lock.json (and covered by
Dependabot), and copy its prebuilt browser bundle into
ui/supplemental/js/vendor/ via a preantora/preantora-local script,
since the site has no client-side bundler of its own.

Signed-off-by: Lukas Hirt <info@hirt.cz>

* refactor: make sync-vendor-assets.js data-driven

Replace the two hardcoded copyFileSync calls with a VENDOR_FILES list,
so vendoring another package's browser build later means adding an
entry instead of writing a new script.

Signed-off-by: Lukas Hirt <info@hirt.cz>

* fix: address review on the medium-zoom vendoring approach

- Add a build-output guard (extension-tests/static-files.test.js) that
  fails loudly if ui/supplemental/js/vendor/ wasn't repopulated before
  the build (e.g. npx antora run directly, bypassing the preantora
  hook): today it publishes green with a 404'ing <script> and image
  zoom silently dead site-wide.
- Make scripts/sync-vendor-assets.js wipe js/vendor/ before
  repopulating it, so dropping an entry from VENDOR_FILES actually
  removes the stale file instead of leaving it on disk in any
  checkout that already had it.
- Narrow the CSS z-index selector to img.medium-zoom-image--opened
  (the class only the currently-zoomed clone gets) instead of the
  bare medium-zoom-image class, which stays on every bound image for
  as long as it's attached and would promote them all to z-index 1000
  the moment anything positions a doc image.
- Add `body >` to the overlay selector so our rule outranks the
  library's own .medium-zoom-overlay by specificity rather than by
  injection order, in case a future medium-zoom release adds its own
  z-index there.
- Document scripts/ and the generated ui/supplemental/js/vendor/ in
  README.md's layout tree.

Signed-off-by: Lukas Hirt <info@hirt.cz>

---------

Signed-off-by: Lukas Hirt <info@hirt.cz>

---------

Signed-off-by: Lukas Hirt <info@hirt.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants