From 994876a662792f6709e2df86a660484638bf7a71 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 1 Nov 2026 16:49:21 +0000 Subject: [PATCH] The family's foot: the home page's line CONVENTION.md section 5 in abap2UI5/abap2UI5.github.io: every site carries the home page's foot, the licence and About, and nothing more. The manual had "License | Contact" and a copyright line. It now has "MIT licensed" (to the licence) and "About" (the home page's, target="_self" so the router does not take it over), in the default theme's own footer. check:cross-site knew the home deployment only as "/". It now also names "/about/", matched exactly like the root. The test pins both the page and that it is not a prefix. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014YZFmEpRdxrjNxTq4x9J4J --- docs/.vitepress/config.mjs | 7 +++---- scripts/lib/cross-site.mjs | 6 +++++- test/cross-site.test.mjs | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index fa349167..c9ae8dd6 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -148,11 +148,10 @@ export default defineConfig({ // abap2UI5 site (CONVENTION.md in abap2UI5/abap2UI5.github.io). Another // deployment on the same origin, hence target _self (check:cross-site). logoLink: { link: "https://abap2ui5.github.io/", target: "_self" }, + // The family's foot (CONVENTION.md section 5 in abap2UI5/abap2UI5.github.io): + // the same line as the home page, the licence and About, nothing more. footer: { - message: ` - License | - Contact`, - copyright: `Copyright © 2023-${new Date().getFullYear()} abap2UI5`, + message: `MIT licensed · About`, }, editLink: { pattern: diff --git a/scripts/lib/cross-site.mjs b/scripts/lib/cross-site.mjs index 270999cb..68447468 100644 --- a/scripts/lib/cross-site.mjs +++ b/scripts/lib/cross-site.mjs @@ -83,9 +83,13 @@ export const RETIRED = new Map([ /** The family's home page, abap2UI5/abap2UI5.github.io: the origin's root, * and only the root - a prefix of everything, so it is matched exactly. */ export const HOME = '/'; +/** The home deployment's other pages, each matched exactly for the same + * reason: About, which the family's foot links from every page + * (CONVENTION.md section 5 over there). */ +export const HOME_PAGES = ['/about/']; export function unreachable(pathname) { - if (pathname === HOME) return null; + if (pathname === HOME || HOME_PAGES.includes(pathname)) return null; for (const at of NEIGHBOURS) if (pathname.startsWith(at)) return null; for (const [at, instead] of RETIRED) { if (pathname === at || pathname.startsWith(at)) return `retired — use ${instead}`; diff --git a/test/cross-site.test.mjs b/test/cross-site.test.mjs index 8a56b5ad..01fcd26d 100644 --- a/test/cross-site.test.mjs +++ b/test/cross-site.test.mjs @@ -129,6 +129,8 @@ test('a cross-site link that points at a deployment which is gone is named as go link that dies fails the build; a link to the site next door just quietly stops being true. */ assert.equal(unreachable('/'), null, 'the home page'); + assert.equal(unreachable('/about/'), null, 'the home page\'s About, which the foot links'); + assert.match(unreachable('/about/team/'), /not a deployment/, 'matched exactly, not as a prefix'); assert.match(unreachable('/nowhere/'), /not a deployment/); assert.equal(unreachable('/playground/'), null); assert.equal(unreachable('/playground/samples/'), null);