From 0fe90da437b92aea8779d756963fdb58d66ff6d2 Mon Sep 17 00:00:00 2001 From: George Date: Thu, 3 Sep 2026 16:02:07 +0400 Subject: [PATCH 1/3] Redirect legacy transaction guide --- astro.config.js | 1 + test/machine-files.test.mjs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/astro.config.js b/astro.config.js index 3b180e7..dc95753 100644 --- a/astro.config.js +++ b/astro.config.js @@ -28,6 +28,7 @@ export default defineConfig({ '/developer/integrations/addresses': '/developer/integrations/reference', '/developer/smart-contract/hyperstaking_tech': '/learn/hyperstaking', '/learn/deep-dive/dusk-evm': '/learn/dusk-evm', + '/learn/transactions': '/learn/deep-dive/duskds-tx-models', '/developer/smart-contracts-dusk-evm/deploy-on-evm': '/developer/duskevm/quickstart', '/developer/smart-contracts-duskds': '/developer/duskvm/overview', '/developer/duskds': '/developer/duskvm/overview', diff --git a/test/machine-files.test.mjs b/test/machine-files.test.mjs index 2b49c43..2b15ef7 100644 --- a/test/machine-files.test.mjs +++ b/test/machine-files.test.mjs @@ -39,3 +39,12 @@ test("documentation pages declare a complete default social preview image", asyn assert.match(config, /dusk-social-preview-og\.png/); assert.match(config, /dusk-social-preview-twitter\.png/); }); + +test("the legacy transaction guide redirects to the current DuskDS model page", async () => { + const config = await readFile(new URL("../astro.config.js", import.meta.url), "utf8"); + + assert.match( + config, + /['"]\/learn\/transactions['"]:\s*['"]\/learn\/deep-dive\/duskds-tx-models['"]/, + ); +}); From e1ceb661ae68f29c8468288fee1237a36cf29f2d Mon Sep 17 00:00:00 2001 From: George Date: Thu, 3 Sep 2026 17:04:25 +0400 Subject: [PATCH 2/3] Clarify legacy redirect fallback --- astro.config.js | 2 ++ test/machine-files.test.mjs | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/astro.config.js b/astro.config.js index dc95753..3880e3a 100644 --- a/astro.config.js +++ b/astro.config.js @@ -28,6 +28,8 @@ export default defineConfig({ '/developer/integrations/addresses': '/developer/integrations/reference', '/developer/smart-contract/hyperstaking_tech': '/learn/hyperstaking', '/learn/deep-dive/dusk-evm': '/learn/dusk-evm', + // Cloudflare owns the production HTTP 301 for both legacy URL variants. + // Keep this Astro redirect as a noindex/canonical static-build fallback. '/learn/transactions': '/learn/deep-dive/duskds-tx-models', '/developer/smart-contracts-dusk-evm/deploy-on-evm': '/developer/duskevm/quickstart', '/developer/smart-contracts-duskds': '/developer/duskvm/overview', diff --git a/test/machine-files.test.mjs b/test/machine-files.test.mjs index 2b15ef7..cc1c093 100644 --- a/test/machine-files.test.mjs +++ b/test/machine-files.test.mjs @@ -40,11 +40,19 @@ test("documentation pages declare a complete default social preview image", asyn assert.match(config, /dusk-social-preview-twitter\.png/); }); -test("the legacy transaction guide redirects to the current DuskDS model page", async () => { - const config = await readFile(new URL("../astro.config.js", import.meta.url), "utf8"); +test("the static build provides a canonical noindex fallback for the legacy transaction guide", async () => { + const redirectPage = await readFile( + new URL("../dist/learn/transactions/index.html", import.meta.url), + "utf8", + ); assert.match( - config, - /['"]\/learn\/transactions['"]:\s*['"]\/learn\/deep-dive\/duskds-tx-models['"]/, + redirectPage, + //, + ); + assert.match(redirectPage, //); + assert.match( + redirectPage, + //, ); }); From 84283b7d5fcad11d76544d3c94fde4f7c7d6a650 Mon Sep 17 00:00:00 2001 From: George Date: Thu, 3 Sep 2026 17:22:08 +0400 Subject: [PATCH 3/3] Align fallback with canonical trailing slash --- astro.config.js | 2 +- test/machine-files.test.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/astro.config.js b/astro.config.js index 3880e3a..1264523 100644 --- a/astro.config.js +++ b/astro.config.js @@ -30,7 +30,7 @@ export default defineConfig({ '/learn/deep-dive/dusk-evm': '/learn/dusk-evm', // Cloudflare owns the production HTTP 301 for both legacy URL variants. // Keep this Astro redirect as a noindex/canonical static-build fallback. - '/learn/transactions': '/learn/deep-dive/duskds-tx-models', + '/learn/transactions': '/learn/deep-dive/duskds-tx-models/', '/developer/smart-contracts-dusk-evm/deploy-on-evm': '/developer/duskevm/quickstart', '/developer/smart-contracts-duskds': '/developer/duskvm/overview', '/developer/duskds': '/developer/duskvm/overview', diff --git a/test/machine-files.test.mjs b/test/machine-files.test.mjs index cc1c093..b22b4d5 100644 --- a/test/machine-files.test.mjs +++ b/test/machine-files.test.mjs @@ -48,11 +48,11 @@ test("the static build provides a canonical noindex fallback for the legacy tran assert.match( redirectPage, - //, + //, ); assert.match(redirectPage, //); assert.match( redirectPage, - //, + //, ); });