Skip to content

Commit 96ff51f

Browse files
authored
Created redirects from old page (#7)
* Installed redirect plugin * Configured redirects from old page (/About) * Added format test to CI build * Fixed redirect from json file * Fixed formatting * Fixed redirect
1 parent bf5b768 commit 96ff51f

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed

.github/workflows/test-deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ jobs:
2020

2121
- name: Install dependencies
2222
run: npm ci
23+
- name: Test format
24+
run: npm run test:format
2325
- name: Test build website
2426
run: npm run build

docusaurus.config.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,50 @@ const config: Config = {
167167
type: "all"
168168
}
169169
}
170+
],
171+
[
172+
"@docusaurus/plugin-client-redirects",
173+
{
174+
// Redirects for the old website
175+
redirects: [
176+
{
177+
from: "/About",
178+
to: "/"
179+
},
180+
{
181+
from: ["/About/CHANGELOG.html", "/About/CHANGELOG"],
182+
to: "/changelog"
183+
},
184+
{
185+
from: ["/About/ApiVersions.html", "/About/ApiVersions"],
186+
to: "/docs/api-versions"
187+
},
188+
{
189+
from: ["/About/ClientID.html", "/About/ClientID"],
190+
to: "/docs/usage-of-clientids"
191+
},
192+
{
193+
from: ["/About/Authorisation.html", "/About/Authorisation"],
194+
to: "/docs/authorizations"
195+
},
196+
{
197+
from: ["/About/VersionHeader.html", "/About/VersionHeader"],
198+
to: "/docs/version-header"
199+
},
200+
{
201+
from: [
202+
"/About/exampledocumentupload.html",
203+
"/About/exampledocumentupload",
204+
"/docs/example-document-upload/examplepm.json"
205+
],
206+
to: "/docs/example-document-upload"
207+
},
208+
{
209+
from: ["/About/ztc1_3problemsandsolutions.html", "/About/ztc1_3problemsandsolutions"],
210+
to: "/docs/ztc1_3problemsandsolutions"
211+
}
212+
]
213+
}
170214
]
171215
]
172216
};

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"dependencies": {
2020
"@docusaurus/core": "3.6.3",
21+
"@docusaurus/plugin-client-redirects": "^3.6.3",
2122
"@docusaurus/preset-classic": "3.6.3",
2223
"@mdx-js/react": "^3.0.0",
2324
"clsx": "^2.0.0",

0 commit comments

Comments
 (0)