fix(site): point site.url at the real publish location (doc.owncloud.com) - #98
Merged
Merged
Conversation
…com)
`site.yml` still declared the prototype's personal-fork address as the site URL:
url: https://deepdiver1975.github.io/owncloud-docs-monorepo
while the site is live on GitHub Pages at the custom domain doc.owncloud.com,
served at the domain ROOT (certificate approved, HTTPS enforced, deployed from
main). The comment right above the key already said it "must match the real
publish location" -- it did not, and because Antora derives canonical URLs, the
sitemap and the navbar link from it, the mismatch was visible in production:
* every page declared a canonical URL on the personal fork, telling search
engines that a fork is the authority for ownCloud's official docs:
<link rel="canonical" href="https://deepdiver1975.github.io/owncloud-docs-monorepo/server/11.0/index.html">
* sitemap.xml served from doc.owncloud.com advertised only off-domain
deepdiver1975.github.io URLs, which crawlers discard
* the navbar logo linked users off doc.owncloud.com to the fork
Search was broken for the same reason. `header-content.hbs` hardcoded the
Pagefind bundle path with the old project-site subpath:
bundle-path="/owncloud-docs-monorepo/pagefind/" -> HTTP 404
/pagefind/pagefind.js -> HTTP 200
The bundle path must stay absolute (the components dynamic-import pagefind.js
relative to their own URL), but on a root-served custom domain the correct
absolute path has no repo prefix. `/pagefind/` is also where the index sits
under `npm run serve`, so the old value was wrong for local preview too.
Verified against a real build (`npm run build`): canonical, sitemap and logo
href now all read https://doc.owncloud.com, the emitted bundle-path is
/pagefind/ and resolves to public/pagefind/pagefind.js, and no reference to the
old address survives anywhere in public/. Full suite is 17/17 with public/
built -- the four tests that need generated output no longer skip.
`site.url` is still overridden for local preview by `npm run antora-local`
(--url http://localhost:8080), so previews are unaffected. The comments in both
files, which documented the now-retired project-site-under-a-subpath layout,
are corrected to describe the custom-domain setup.
Not touched: the `/owncloud-docs-monorepo/...` prefixes in
test/go-redirect.test.js. resolveGoPhp is deliberately prefix-agnostic -- it only
rewrites the /server/<version>/ segment -- so those are arbitrary fixtures that
still pass, and keeping a prefixed case documents that property.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
phil-davis
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
site.ymldeclared the prototype's personal-fork address as the site URL:…while the site is live on GitHub Pages at the custom domain
doc.owncloud.com, served at the domain root (protected_domain_state: verified, certificate approved, HTTPS enforced, deployed frommain). The comment directly above the key already said it "must match the real publish location" — it did not.Antora derives canonical URLs, the sitemap and the navbar link from
site.url, so this was not cosmetic — it was visible in production. All four confirmed against the live site before the fix:<link rel="canonical" href="https://deepdiver1975.github.io/owncloud-docs-monorepo/server/11.0/index.html">sitemap.xmlon doc.owncloud.comdeepdiver1975.github.ioURLshref="https://deepdiver1975.github.io/owncloud-docs-monorepo"/owncloud-docs-monorepo/pagefind/pagefind.js→ 404The canonical tag is the serious one: every page of ownCloud's official documentation was telling search engines that a personal fork is the authoritative copy.
Site search was broken too
ui/supplemental/partials/header-content.hbshardcoded the Pagefind bundle path with the old project-site subpath:The path must stay absolute (the components
dynamic-import()pagefind.jsrelative to their own URL, so./pagefind/would double up and 404 on shallow pages) — but on a root-served custom domain the correct absolute path carries no repo prefix./pagefind/is also where the index sits undernpm run serve, so the old value was wrong for local preview as well.Verified against a real build
Not just inspected —
npm run buildwas run and the generated output checked:/pagefind/resolves:public/pagefind/pagefind.jsexists.grep -rl 'deepdiver1975\|owncloud-docs-monorepo' public/→ no matches; not one stale reference survives in the built site.npm test→ 17/17 pass, 0 skipped. Withpublic/built, the four tests that require generated output run instead of skipping.Local preview is unaffected:
npm run antora-localoverridessite.urlwith--url http://localhost:8080.Also in this PR
site.url(default.hbsPagefind dedup,sitemap-cleanup.js, the navbar logo), so the next person changing the deploy target knows what moves with it.@paramexample ingo-redirect.js's docblock.Deliberately not touched
The
/owncloud-docs-monorepo/...prefixes intest/go-redirect.test.js.resolveGoPhpis prefix-agnostic by design — it only rewrites the/server/<version>/segment — so those are arbitrary fixtures that still pass, and keeping a prefixed case documents that property. Also left alone:package-lock.json'snamefield, which is an npm package name, not a URL.🤖 Generated with Claude Code