From 4e24f74b76bd8dd9831f0ee3171d4c6b7c80120b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20M=C3=BCller?=
<1005065+DeepDiver1975@users.noreply.github.com>
Date: Fri, 21 Aug 2026 12:28:15 +0200
Subject: [PATCH] fix(site): point site.url at the real publish location
(doc.owncloud.com)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
`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:
* 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// segment -- so those are arbitrary fixtures that
still pass, and keeping a prefixed case documents that property.
Co-Authored-By: Claude Opus 5
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
---
site.yml | 11 +++++++----
ui/supplemental/js/go-redirect.js | 2 +-
ui/supplemental/partials/header-content.hbs | 8 +++++---
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/site.yml b/site.yml
index ba6ab90..859e75a 100644
--- a/site.yml
+++ b/site.yml
@@ -1,9 +1,12 @@
site:
title: Documentation for ownCloud (A Kiteworks Company)
- # Deploy target is a GitHub Pages PROJECT site served under a subpath.
- # This URL drives canonical links (used by the Pagefind dedup layout) and
- # absolute asset resolution -- it must match the real publish location.
- url: https://deepdiver1975.github.io/owncloud-docs-monorepo
+ # Deploy target is GitHub Pages on the custom domain doc.owncloud.com, served
+ # at the domain ROOT (no repo subpath). This URL drives canonical links (used
+ # by the Pagefind dedup layout in ui/supplemental/layouts/default.hbs), the
+ # sitemap written by antora-extensions/sitemap-cleanup.js, and the navbar logo
+ # link -- it must match the real publish location. Local preview overrides it
+ # via `npm run antora-local` (--url http://localhost:8080).
+ url: https://doc.owncloud.com
# the site's landing page resides in the main content component
# but it MUST be named ROOT to get a component/version-less landing page.
# see: https://docs.antora.org/antora/latest/page/start-page/
diff --git a/ui/supplemental/js/go-redirect.js b/ui/supplemental/js/go-redirect.js
index 6bfa2ce..8b2a375 100644
--- a/ui/supplemental/js/go-redirect.js
+++ b/ui/supplemental/js/go-redirect.js
@@ -113,7 +113,7 @@
* redirect a legacy `go.php?to=` request to, or null when this is not a
* go.php request (so callers leave the page untouched).
*
- * @param {string} pathname e.g. "/owncloud-docs-monorepo/server/latest/go.php"
+ * @param {string} pathname e.g. "/server/latest/go.php"
* @param {string} search e.g. "?to=admin-sharing"
* @returns {string|null} the redirect target, relative to the site, or null
*/
diff --git a/ui/supplemental/partials/header-content.hbs b/ui/supplemental/partials/header-content.hbs
index 3ba43a3..b0b6d61 100644
--- a/ui/supplemental/partials/header-content.hbs
+++ b/ui/supplemental/partials/header-content.hbs
@@ -10,9 +10,11 @@
overlay (also via Ctrl/Cmd+K). bundle-path MUST be absolute (the
components dynamic-import() pagefind.js relative to
pagefind-component-ui.js's URL, so "./pagefind/" would double and
- 404 on shallow pages). On a GitHub Pages PROJECT site the index is
- served under the repo subpath, so the absolute path includes it. --}}
-
+ 404 on shallow pages). The site is served at the root of the custom
+ domain doc.owncloud.com, so the index is at /pagefind/ -- which is
+ also where it sits under `npm run serve`. A repo-subpath prefix
+ here would 404 on both. --}}
+