From 1473f8354d430a632c2b29f7530cd0bfb6b0d883 Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Thu, 8 Jan 2026 12:15:02 +0000 Subject: [PATCH] feat(pm/wiki): add Public namespace Change-Id: kxlttrouqolwwwuuumommyltzpqknkrz Previously our Johnny Decimal templates wouldn't work with pages that started with Public:. Setting that up as a namespace will make it work again with no further modification. It'll also have the benefit of easily listing them and changing the UI around moving pages to be public --- packetmix/systems/wiki/wiki.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packetmix/systems/wiki/wiki.nix b/packetmix/systems/wiki/wiki.nix index f26efcce..faf37e24 100644 --- a/packetmix/systems/wiki/wiki.nix +++ b/packetmix/systems/wiki/wiki.nix @@ -224,7 +224,15 @@ $wgScribuntoDefaultEngine = 'luasandbox'; + define("NS_PUBLIC", 3000); + define("NS_PUBLIC_TALK", 3001); + + // Add namespaces. + $wgExtraNamespaces[NS_PUBLIC] = "Public"; + $wgExtraNamespaces[NS_PUBLIC_TALK] = "Public_talk"; + $wgNamespacesWithSubpages[NS_MAIN] = true; + $wgNamespacesWithSubpages[NS_PUBLIC] = true; $wgNamespacePreloadDoExpansion = false; // This can't expand {{PAGENAME}} (or like) correctly, making it very nearly useless @@ -236,6 +244,7 @@ ]; $wgSearchType = 'CirrusSearch'; $wgNamespacesToBeSearchedDefault[NS_CATEGORY] = true; + $wgNamespacesToBeSearchedDefault[NS_PUBLIC] = true; $wgUrlProtocols[] = "rad:"; -- 2.43.0