From ac603ea8b92d88f78f8bf8c81a85080e109e0aff Mon Sep 17 00:00:00 2001
From: Floren Munteanu <19806136+fmunteanu@users.noreply.github.com>
Date: Mon, 27 Apr 2026 02:40:37 -0400
Subject: [PATCH 1/2] fix: var replacements
---
blog/2026/04/21.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/blog/2026/04/21.md b/blog/2026/04/21.md
index 2595209..dde2db6 100644
--- a/blog/2026/04/21.md
+++ b/blog/2026/04/21.md
@@ -13,6 +13,7 @@ tags:
features:
syntax:
- code
+ - var
---
# Website Infrastructure Design
@@ -58,10 +59,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 ${domain.protocol}://${domain.name} | 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 ${domain.protocol}://${domain.name} | grep -iE "age:|cf-cache-status|cf-ray"
cf-ray: 9f194d2bdda437a1-YYZ
cf-cache-status: HIT
age: 2
From 46de286a0a44a2df606d2a7a3b7fdc244885f9ba Mon Sep 17 00:00:00 2001
From: Floren Munteanu <19806136+fmunteanu@users.noreply.github.com>
Date: Mon, 27 Apr 2026 03:14:14 -0400
Subject: [PATCH 2/2] fix: var replacement
Co-authored-by: Copilot
---
.github/actions/config/production.js | 37 ++++++++++++++++++++++++++++
.github/actions/services/Bucket.js | 8 ++++++
blog/2026/04/21.md | 5 ++--
3 files changed, 47 insertions(+), 3 deletions(-)
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 dde2db6..3f9db65 100644
--- a/blog/2026/04/21.md
+++ b/blog/2026/04/21.md
@@ -13,7 +13,6 @@ tags:
features:
syntax:
- code
- - var
---
# Website Infrastructure Design
@@ -59,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 ${domain.protocol}://${domain.name} | grep -iE "age:|cf-cache-status|cf-ray"
+$ curl -sI | grep -iE "age:|cf-cache-status|cf-ray"
cf-ray: 9f194d1d2bd4ab7c-YYZ
-$ curl -sI ${domain.protocol}://${domain.name} | 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