From b46ffc66f189283698c245e54f93ca83aab01b93 Mon Sep 17 00:00:00 2001 From: Giedrius Grabauskas Date: Tue, 17 Dec 2024 09:58:34 +0200 Subject: [PATCH 1/6] Installed redirect plugin --- package-lock.json | 25 +++++++++++++++++++++++++ package.json | 1 + 2 files changed, 26 insertions(+) diff --git a/package-lock.json b/package-lock.json index 6911b4c..b85c0d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "dependencies": { "@docusaurus/core": "3.6.3", + "@docusaurus/plugin-client-redirects": "^3.6.3", "@docusaurus/preset-classic": "3.6.3", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", @@ -3547,6 +3548,30 @@ "react-dom": "*" } }, + "node_modules/@docusaurus/plugin-client-redirects": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-3.6.3.tgz", + "integrity": "sha512-fQDCxoJCO1jXNQGQmhgYoX3Yx+Z2xSbrLf3PBET6pHnsRk6gGW/VuCHcfQuZlJzbTxN0giQ5u3XcQQ/LzXftJA==", + "license": "MIT", + "dependencies": { + "@docusaurus/core": "3.6.3", + "@docusaurus/logger": "3.6.3", + "@docusaurus/utils": "3.6.3", + "@docusaurus/utils-common": "3.6.3", + "@docusaurus/utils-validation": "3.6.3", + "eta": "^2.2.0", + "fs-extra": "^11.1.1", + "lodash": "^4.17.21", + "tslib": "^2.6.0" + }, + "engines": { + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, "node_modules/@docusaurus/plugin-content-blog": { "version": "3.6.3", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.6.3.tgz", diff --git a/package.json b/package.json index 5b4e726..31f5ab8 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ }, "dependencies": { "@docusaurus/core": "3.6.3", + "@docusaurus/plugin-client-redirects": "^3.6.3", "@docusaurus/preset-classic": "3.6.3", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", From fd8b4e2d1224b16b414af5f9fd20b0e54ed1dca6 Mon Sep 17 00:00:00 2001 From: Giedrius Grabauskas Date: Tue, 17 Dec 2024 09:58:51 +0200 Subject: [PATCH 2/6] Configured redirects from old page (/About) --- docusaurus.config.ts | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 248e1b3..bef2133 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -167,6 +167,50 @@ const config: Config = { type: "all" } } + ], + [ + "@docusaurus/plugin-client-redirects", + { + // Redirects for the old website + redirects: [ + { + from: ["/About", "/About/"], + to: "/" + }, + { + from: ["/About/CHANGELOG.html", "/About/CHANGELOG"], + to: "/changelog" + }, + { + from: ["/About/ApiVersions.html", "/About/ApiVersions"], + to: "/docs/api-versions" + }, + { + from: ["/About/ClientID.html", "/About/ClientID"], + to: "/docs/usage-of-clientids" + }, + { + from: ["/About/Authorisation.html", "/About/Authorisation"], + to: "/docs/authorizations" + }, + { + from: ["/About/VersionHeader.html", "/About/VersionHeader"], + to: "/docs/version-header" + }, + { + from: ["/About/exampledocumentupload.html", "/About/exampledocumentupload"], + to: "/docs/example-document-upload" + }, + { + from: "/About/examplepm.json", + to: "/docs/example-document-upload/examplepm.json" + }, + { + from: ["/About/ztc1_3problemsandsolutions.html", "/About/ztc1_3problemsandsolutions"], + to: "/docs/ztc1_3problemsandsolutions" + } + ] + } ] ] }; From 2ac3f989368675549af3b2b349a89fc4bad6d692 Mon Sep 17 00:00:00 2001 From: Giedrius Grabauskas Date: Tue, 17 Dec 2024 10:00:02 +0200 Subject: [PATCH 3/6] Added format test to CI build --- .github/workflows/test-deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index e686334..46c2d6d 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -20,5 +20,7 @@ jobs: - name: Install dependencies run: npm ci + - name: Test format + run: npm run test:format - name: Test build website run: npm run build From ea3529f6187a2a248cec8855cd53ca2f2fea7d95 Mon Sep 17 00:00:00 2001 From: Giedrius Grabauskas Date: Tue, 17 Dec 2024 10:13:14 +0200 Subject: [PATCH 4/6] Fixed redirect from json file --- docusaurus.config.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index bef2133..4589bee 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -198,13 +198,9 @@ const config: Config = { to: "/docs/version-header" }, { - from: ["/About/exampledocumentupload.html", "/About/exampledocumentupload"], + from: ["/About/exampledocumentupload.html", "/About/exampledocumentupload", "/docs/example-document-upload/examplepm.json"], to: "/docs/example-document-upload" }, - { - from: "/About/examplepm.json", - to: "/docs/example-document-upload/examplepm.json" - }, { from: ["/About/ztc1_3problemsandsolutions.html", "/About/ztc1_3problemsandsolutions"], to: "/docs/ztc1_3problemsandsolutions" From c6fb4693a352d434273a6a6d930b7e8c6673dcb2 Mon Sep 17 00:00:00 2001 From: Giedrius Grabauskas Date: Tue, 17 Dec 2024 10:14:33 +0200 Subject: [PATCH 5/6] Fixed formatting --- docusaurus.config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 4589bee..5fb1c8e 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -198,7 +198,11 @@ const config: Config = { to: "/docs/version-header" }, { - from: ["/About/exampledocumentupload.html", "/About/exampledocumentupload", "/docs/example-document-upload/examplepm.json"], + from: [ + "/About/exampledocumentupload.html", + "/About/exampledocumentupload", + "/docs/example-document-upload/examplepm.json" + ], to: "/docs/example-document-upload" }, { From 18506533bc143f29ca1c268da6460d531e2dfa83 Mon Sep 17 00:00:00 2001 From: Giedrius Grabauskas Date: Tue, 17 Dec 2024 10:44:47 +0200 Subject: [PATCH 6/6] Fixed redirect --- docusaurus.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 5fb1c8e..8ad2e7c 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -174,7 +174,7 @@ const config: Config = { // Redirects for the old website redirects: [ { - from: ["/About", "/About/"], + from: "/About", to: "/" }, {