Skip to content

Commit 6b130b1

Browse files
authored
Set up redirects for UTxO-HD pages (#1648)
Re-shaping the documentation broke the UTxO-HD links.
2 parents 698f67e + a20eb6a commit 6b130b1

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md
33

44
ouroboros-consensus-cardano/golden/**/* linguist-generated=true
5+
docs/website/yarn.lock linguist-generated=true

docs/website/docusaurus.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,28 @@ const config = {
184184
additionalLanguages: ['haskell'],
185185
},
186186
}),
187+
188+
plugins: [
189+
[
190+
'@docusaurus/plugin-client-redirects',
191+
{
192+
redirects: [
193+
{
194+
from: '/docs/for-developers/utxo-hd/overview',
195+
to: '/docs/references/miscellaneous/utxo-hd/',
196+
},
197+
],
198+
createRedirects(existingPath) {
199+
if (existingPath.includes('/docs/references/miscellaneous/utxo-hd')) {
200+
return [
201+
existingPath.replace('/docs/references/miscellaneous/utxo-hd', '/docs/for-developers/utxo-hd'),
202+
];
203+
}
204+
return undefined;
205+
},
206+
},
207+
],
208+
],
187209
};
188210

189211
module.exports = config;

docs/website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
},
1717
"dependencies": {
1818
"@docusaurus/core": "^3.7.0",
19+
"@docusaurus/plugin-client-redirects": "3.7.0",
1920
"@docusaurus/preset-classic": "^3.7.0",
2021
"@docusaurus/theme-mermaid": "^3.7.0",
2122
"@mdx-js/react": "^3.0.1",

docs/website/yarn.lock

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)