From 6787daa562d8fba8e5d35c4da4f361ad37a113b9 Mon Sep 17 00:00:00 2001 From: "Zack M. Davis" Date: Wed, 15 Jul 2026 18:34:19 -0700 Subject: [PATCH] relative SITEURL enables testing prior to DNS cutover --- publishconf.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/publishconf.py b/publishconf.py index 720d960..3704389 100644 --- a/publishconf.py +++ b/publishconf.py @@ -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 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 -- 2.53.0