diff --git a/.github/actions/config/production.js b/.github/actions/config/production.js index e63511f..0d244ad 100644 --- a/.github/actions/config/production.js +++ b/.github/actions/config/production.js @@ -183,6 +183,41 @@ module.exports = { * @type {Object} */ workflow: { + /** + * Public domain identity for the published website + * + * Defines the canonical hostname and protocol of the deployed website. + * Used to expand `` placeholders in entry + * bodies during the upload pass, so authors can reference the live URL + * symbolically and the resolved value is baked into the R2 object once, + * never re-evaluated at render time. + * + * @type {Object} + */ + domain: { + /** + * Hostname of the published website + * + * The bare domain name without protocol or trailing path. Combined + * with `protocol` to form the full URL when expanding placeholders. + * + * @type {string} + * @default 'axivo.com' + */ + name: 'axivo.com', + + /** + * Transport protocol for the published website + * + * The scheme used to reach the website. Combined with `name` to form + * the full URL. Always `https` for production traffic. + * + * @type {string} + * @default 'https' + */ + protocol: 'https' + }, + /** * Standard labels to apply to workflow-generated issues * @@ -232,5 +267,7 @@ module.exports = { * @default 'workflow: Issues Detected' */ title: 'workflow: Issues Detected' + + } }; diff --git a/.github/actions/services/Bucket.js b/.github/actions/services/Bucket.js index 7004063..b5a8dc6 100644 --- a/.github/actions/services/Bucket.js +++ b/.github/actions/services/Bucket.js @@ -9,6 +9,7 @@ const { DeleteObjectCommand, DeleteObjectsCommand, ListObjectsV2Command, PutObje const { slug: githubSlug } = require('github-slugger'); const { existsSync, readFileSync, readdirSync, statSync } = require('node:fs'); const { basename, dirname, join } = require('node:path'); +const config = require('../config'); const blogPrefix = 'blog'; const contentPrefix = 'src/content'; const features = { @@ -166,6 +167,10 @@ class BucketService { throw new Error(`Invalid UUID "${match[1]}" in block (${filePath})`); } } + const domain = config.get('workflow.domain'); + const variables = { + domain: `${domain.protocol}://${domain.name}` + }; let entryContent = body; entryContent = entryContent.replace(/[\s\S]*?\n?/g, ''); entryContent = entryContent.replace(//g, (_, block) => block.trim()); @@ -173,6 +178,9 @@ class BucketService { entryContent = entryContent.replace(/(?`, 'g'), value); + } return [{ frontmatter: fm, slug, title, body: entryContent }]; } diff --git a/blog/2026/04/21.md b/blog/2026/04/21.md index 2595209..3f9db65 100644 --- a/blog/2026/04/21.md +++ b/blog/2026/04/21.md @@ -58,10 +58,10 @@ The Worker handles the gap by overwriting `Vary` to `Accept-Encoding` on cacheab A simple diagnostic with two consecutive HEAD requests to the homepage: ```shell -$ curl -sI https://axivo.com | grep -iE "age:|cf-cache-status|cf-ray" +$ curl -sI | grep -iE "age:|cf-cache-status|cf-ray" cf-ray: 9f194d1d2bd4ab7c-YYZ -$ curl -sI https://axivo.com | grep -iE "age:|cf-cache-status|cf-ray" +$ curl -sI | grep -iE "age:|cf-cache-status|cf-ray" cf-ray: 9f194d2bdda437a1-YYZ cf-cache-status: HIT age: 2