refactor: extract hardcoded postguard.eu URL into SITE_URL constant#255
Merged
Conversation
Replace 24+ literal 'https://postguard.eu' across 13 files with a single SITE_URL exported from src/lib/env.ts, using the runtimeConfig mechanism that BUSINESS_URL already follows so staging/dev can override without a rebuild on non-prerendered routes. Closes #252
rubenhensen
approved these changes
Jun 5, 2026
2 tasks
rubenhensen
pushed a commit
to encryption4all/postguard-docs
that referenced
this pull request
Jun 15, 2026
* docs: document pg-js 2.0 DecryptFileResult + onDownloadProgress + cause-preserving IdentityMismatchError Sources: - encryption4all/postguard-js#86 (DecryptFileResult shape change, onDownloadProgress) - encryption4all/postguard-js#84 (IdentityMismatchError cause preservation) * docs: clarify createEnvelope tier 2 vs tier 3 upload-failure semantics Source: encryption4all/postguard-js#82 (re-throw on tier 3, console.warn on tier 2) * docs: add Runtime config section for postguard-website APP_CONFIG keys Sources: - encryption4all/postguard-website#244 (STAGING) - encryption4all/postguard-website#247 (GLITCHTIP_DSN) - encryption4all/postguard-website#255 (SITE_URL) * docs: surface private signing attributes on FriendlySender (from encryption4all/postguard-js#89) * docs: document /download trust-confirmation gate (from encryption4all/postguard-website#258) --------- Co-authored-by: dobby-yivi-agent[bot] <275734547+dobby-yivi-agent[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a single shared
SITE_URLtosrc/lib/env.tsand replace 24+ hardcoded'https://postguard.eu'literals across 14 files. Uses the sameruntimeConfig()pattern thatBUSINESS_URLalready follows.Files touched
src/lib/env.ts— addsSITE_URLsrc/lib/components/SEO.svelte,src/lib/authors.tssrc/routes/(marketing)/+page.svelte(6x JSON-LD),addons/+page.svelte(6x),about/+page.svelte(4x),privacy/+page.svelte(5x),blog/+page.svelte,blog/[slug]/+page.svelte,blog/rss.xml/+server.jssrc/routes/(app)/fileshare/+page.svelte(2x),decrypt/+page.svelte(2x)src/routes/sitemap.xml/+server.js,robots.txt/+server.js(the latter wasn't in the issue list but had the same literal)Blog post content under
src/content/blog/*.svxwas intentionally left alone — those are written content, not code references.Out of scope / behavior notes
APP_CONFIG.SITE_URLruntime override only takes effect on non-prerendered(app)routes (/decrypt,/fileshare). The single-source goal (issue Refactor: extract hardcoded 'https://postguard.eu' into a shared SITE_URL constant #252's primary motivation) is still met: a future domain rename is one edit inenv.tsplus a rebuild.grep -rn \"'https://postguard.eu'\" srcmatches only the fallback inenv.tsand the two blog post bodies.Closes #252
Test plan
npm run check(svelte-check) — cleannpm run lint(prettier + eslint) — cleannpm run build— succeedsbuild/sitemap.xml,build/blog/rss.xml,build/robots.txt,build/index.html,build/about/index.html,build/privacy/index.html,build/addons/index.htmlall still containhttps://postguard.euin the expected places.