diff --git a/docs/.wikven.yaml b/docs/.wikven.yaml index 34d0c4316..a3cc65d63 100644 --- a/docs/.wikven.yaml +++ b/docs/.wikven.yaml @@ -16,6 +16,11 @@ skins: - Citizen - MinervaNeue config: + # Where this site is served from. Nothing in a build can work this out for itself: it renders + # against a local server and links every page relatively, which is what lets an export run from + # any directory and any host. Anything that has to name a page from outside the site is built + # from this. + WikvenSiteUrl: https://chaotic-ground.github.io/wikven/ WikvenFooterUrl: https://github.com/chaotic-ground/wikven WikvenEditUrl: https://github.com/chaotic-ground/wikven/edit/main/docs/$1 WikvenHistoryUrl: https://github.com/chaotic-ground/wikven/commits/main/docs/$1 diff --git a/includes/WikvenSettings.php b/includes/WikvenSettings.php index 673be8952..65c6ff721 100644 --- a/includes/WikvenSettings.php +++ b/includes/WikvenSettings.php @@ -155,8 +155,11 @@ // Load config: default.yml then the site file via $wgSettings; ext/skin lists loaded leniently. global $wgSettings; -// Autoloader not active yet at LocalSettings time; load the helper directly. +// Autoloader not active yet at LocalSettings time; load the helpers directly. SiteUrl belongs here +// rather than beside its other use below: lint() reads a site's WikvenSiteUrl through it, and that +// runs a few lines down from here. require_once "$IP/extensions/Wikven/includes/SiteConfig.php"; +require_once "$IP/extensions/Wikven/includes/SiteUrl.php"; // Pick the highest-precedence config name present; warn about any others. $wikvenLocated = MediaWiki\Extension\Wikven\SiteConfig::locate($wikvenSrc); @@ -198,9 +201,6 @@ // Push merged config into globals so the logo handling below reads final values. $wgSettings->apply(); -// Autoloader not active yet at LocalSettings time; load the helper directly. -require_once "$IP/extensions/Wikven/includes/SiteUrl.php"; - // Core keeps a site's address in two halves -- $wgCanonicalServer is scheme and host, a path lives // elsewhere -- and a site should not have to write it twice. It writes WikvenSiteUrl once and this // hands core the half core understands, so an absolute URL core or any extension builds names the