]> zackmdavis.net Git - An_Algorithmic_Lucidity.git/commitdiff
relative SITEURL enables testing prior to DNS cutover
authorZack M. Davis <code@zackmdavis.net>
Thu, 16 Jul 2026 01:34:19 +0000 (18:34 -0700)
committerZack M. Davis <code@zackmdavis.net>
Thu, 16 Jul 2026 01:34:19 +0000 (18:34 -0700)
publishconf.py

index 720d9604ff304949837aaf82bb31a6ed644cd2a1..370438946c389ee27874f4bbdc78100aaaa18000 100644 (file)
@@ -12,7 +12,13 @@ from pelicanconf import *
 # The blog lives under /blog on this domain, not at the root (the root is a
 # small standalone landing page, not part of this Pelican site) -- no
 # trailing slash, matching Pelican's own convention for SITEURL.
-SITEURL = 'https://zackmdavis.net/blog'
+#
+# Deliberately root-relative (no scheme/host): every template link is built
+# by concatenating SITEURL onto a path, so a bare https://... here would
+# hardcode https into every internal link (CSS, nav, favicon, ...)
+# regardless of what protocol the page itself was loaded over -- breaking
+# things like previewing over plain HTTP before a certificate exists.
+SITEURL = '/blog'
 
 # RSS (not Atom) to match the existing WordPress feed's format at
 # zackmdavis.net/blog/feed/. The output path is feed/index.xml rather than
@@ -22,6 +28,14 @@ SITEURL = 'https://zackmdavis.net/blog'
 FEED_ALL_RSS = 'feed/index.xml'
 CATEGORY_FEED_RSS = 'category/{slug}/feed/index.xml'
 
-DELETE_OUTPUT_DIRECTORY = True
+# Feed readers fetch feed XML out of any page context, so its content
+# ideally wants absolute URLs -- but Pelican only uses FEED_DOMAIN for the
+# feed's own self-referential link (writers.py); each post's own <link> is
+# still built straight from SITEURL, so with SITEURL root-relative those
+# come out as bare /blog/... too. Harmless while nobody's actually
+# subscribed to this pre-launch server; revisit (probably by making
+# SITEURL fully-qualified again) once real DNS + a certificate are live and
+# this feed has real subscribers.
+FEED_DOMAIN = 'https://zackmdavis.net'
 
-# Keep RELATIVE_URLS = False for production to get proper absolute URLs
+DELETE_OUTPUT_DIRECTORY = True