Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions astro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ 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',
'/developer/duskds': '/developer/duskvm/overview',
Expand Down
17 changes: 17 additions & 0 deletions test/machine-files.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,20 @@ 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 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(
redirectPage,
/<meta http-equiv="refresh" content="0;url=\/learn\/deep-dive\/duskds-tx-models\/">/,
);
Comment thread
GeorgianDusk marked this conversation as resolved.
assert.match(redirectPage, /<meta name="robots" content="noindex">/);
assert.match(
redirectPage,
/<link rel="canonical" href="https:\/\/docs\.dusk\.network\/learn\/deep-dive\/duskds-tx-models\/">/,
);
Comment thread
GeorgianDusk marked this conversation as resolved.
});