From f37667f3bf24f820d9b3a0ea438444f739896a22 Mon Sep 17 00:00:00 2001 From: bgravenorst Date: Mon, 31 Jul 2023 16:36:33 +1000 Subject: [PATCH 1/3] Add release process for versioned docs. Signed-off-by: bgravenorst --- docs/contribute/doc-release-process.md | 119 +++++++++++++++++++++ package-lock.json | 140 +++++++++++++++++++++++++ 2 files changed, 259 insertions(+) create mode 100644 docs/contribute/doc-release-process.md diff --git a/docs/contribute/doc-release-process.md b/docs/contribute/doc-release-process.md new file mode 100644 index 0000000..d34a061 --- /dev/null +++ b/docs/contribute/doc-release-process.md @@ -0,0 +1,119 @@ +--- +description: Release process for documentation that uses a versioning system. +sidebar_position: 8 +--- + +# Documentation release process + +The following instructions are for documentation that uses the Docusaurus versioning system. + +:::info +Currently, only the Teku documentation utilizes versioning, supporting just two versions: `stable` and `development`. +This means previous releases must be removed as part of the release process. +::: + +A new stable version of the documentation is released when a new version of the software is released. +In the following example we'll release the `23.6.3` version of the documentation (from `23.6.2`). + +## Steps + +You'll need to create a documentation pull request with the following changes: + +### 1. Create a new version of the documentation: + +Create a new documentation version by running the following command: + + + +# Syntax + +```bash +npm run docusaurus docs:version +``` + +# Example + +```bash +npm run docusaurus docs:version 23.6.3 +``` + + + +This command: + +- Copies the full `docs/` directory into a new `version-` directory in the `versioned_docs` directory. +- Creates a new `versioned_sidebars/version--sidebars.json` file +- Appends the new version number to the `versions.json` file. + +### 2. Update the `docusaurus.config.js` file + +In `docusaurus.config.js`, under `presets` > `classic` > `docs`: + +- Update the `lastVersion` to the new version number. +- Under `versions`, update the current stable version to the new version + +For example, when releasing version `23.6.3` (from `23.6.2`), update the following section in the `docusaurus.config.js` +file by updating the version number: + +```javascript +presets: [ + [ + "classic", + { + docs: { + sidebarPath: require.resolve("./sidebars.js"), + // Set a base path separate from default /docs + editUrl: "https://github.com/ConsenSys/doc.teku/tree/master/", + routeBasePath: "/", + path: "./docs", + includeCurrentVersion: true, + // highlight-next-line + lastVersion: "23.6.3", + versions: { + //defaults to the ./docs folder + // using 'development' instead of 'next' as path + current: { + label: "development", + path: "development", + }, + //the last stable release in the versioned_docs/version-stable + // highlight-start + "23.6.3": { + label: "stable (23.6.3)", + }, + // highlight-end + }, +... +], + +``` + +### 3. Update the `versions.json` file + +Delete the previous version from the `versions.json` file: + +Before: + +```json +[ + "23.6.3", + "23.6.2" +] +``` + +After: + +```json +[ + "23.6.3" +] +``` + +### 4. Delete the previous doc versions + +Lastly, we'll cleanup the documentation directory by deleting the previous stable docs. For this example it means: + +1. In the `versioned_docs` directory, delete the `version-23.6.2` folder +2. In the `versioned_sidebars` directory, delete the `version-23.6.2-sidebars.json` file. + +Create your pull request. You can perform a final check using the Preview link that gets created for your PR. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9a3df27..fc2c60b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14598,6 +14598,8 @@ }, "node_modules/npm/node_modules/@colors/colors": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -14631,6 +14633,8 @@ }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, "inBundle": true, "license": "MIT", @@ -14643,6 +14647,8 @@ }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "inBundle": true, "license": "MIT" @@ -15024,6 +15030,8 @@ }, "node_modules/npm/node_modules/aggregate-error": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "inBundle": true, "license": "MIT", @@ -15037,6 +15045,8 @@ }, "node_modules/npm/node_modules/ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -15046,6 +15056,8 @@ }, "node_modules/npm/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "inBundle": true, "license": "MIT", @@ -15086,12 +15098,16 @@ }, "node_modules/npm/node_modules/balanced-match": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/base64-js": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true, "funding": [ { @@ -15136,6 +15152,8 @@ }, "node_modules/npm/node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "inBundle": true, "license": "MIT", @@ -15201,6 +15219,8 @@ }, "node_modules/npm/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "inBundle": true, "license": "MIT", @@ -15253,6 +15273,8 @@ }, "node_modules/npm/node_modules/clean-stack": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, "inBundle": true, "license": "MIT", @@ -15275,6 +15297,8 @@ }, "node_modules/npm/node_modules/cli-table3": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", "dev": true, "inBundle": true, "license": "MIT", @@ -15290,6 +15314,8 @@ }, "node_modules/npm/node_modules/clone": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "dev": true, "inBundle": true, "license": "MIT", @@ -15308,6 +15334,8 @@ }, "node_modules/npm/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -15320,6 +15348,8 @@ }, "node_modules/npm/node_modules/color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "inBundle": true, "license": "MIT" @@ -15354,6 +15384,8 @@ }, "node_modules/npm/node_modules/concat-map": { "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, "inBundle": true, "license": "MIT" @@ -15395,6 +15427,8 @@ }, "node_modules/npm/node_modules/cssesc": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, "inBundle": true, "license": "MIT", @@ -15407,6 +15441,8 @@ }, "node_modules/npm/node_modules/debug": { "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -15430,6 +15466,8 @@ }, "node_modules/npm/node_modules/defaults": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "dev": true, "inBundle": true, "license": "MIT", @@ -15466,12 +15504,16 @@ }, "node_modules/npm/node_modules/eastasianwidth": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/emoji-regex": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "inBundle": true, "license": "MIT" @@ -15521,6 +15563,8 @@ }, "node_modules/npm/node_modules/fastest-levenshtein": { "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", "dev": true, "inBundle": true, "license": "MIT", @@ -15558,12 +15602,16 @@ }, "node_modules/npm/node_modules/fs.realpath": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/function-bind": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true, "inBundle": true, "license": "MIT" @@ -15611,12 +15659,16 @@ }, "node_modules/npm/node_modules/graceful-fs": { "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/has": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "inBundle": true, "license": "MIT", @@ -15629,6 +15681,8 @@ }, "node_modules/npm/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -15644,6 +15698,8 @@ }, "node_modules/npm/node_modules/hosted-git-info": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, "inBundle": true, "license": "ISC", @@ -15743,6 +15799,8 @@ }, "node_modules/npm/node_modules/imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "inBundle": true, "license": "MIT", @@ -15752,6 +15810,8 @@ }, "node_modules/npm/node_modules/indent-string": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, "inBundle": true, "license": "MIT", @@ -15767,6 +15827,8 @@ }, "node_modules/npm/node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "inBundle": true, "license": "ISC", @@ -15777,6 +15839,8 @@ }, "node_modules/npm/node_modules/inherits": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true, "inBundle": true, "license": "ISC" @@ -15849,6 +15913,8 @@ }, "node_modules/npm/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "inBundle": true, "license": "MIT", @@ -15864,6 +15930,8 @@ }, "node_modules/npm/node_modules/isexe": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true, "inBundle": true, "license": "ISC" @@ -15888,6 +15956,8 @@ }, "node_modules/npm/node_modules/json-parse-even-better-errors": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", "dev": true, "inBundle": true, "license": "MIT", @@ -16096,6 +16166,8 @@ }, "node_modules/npm/node_modules/lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, "inBundle": true, "license": "ISC", @@ -16315,6 +16387,8 @@ }, "node_modules/npm/node_modules/mkdirp": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, "inBundle": true, "license": "MIT", @@ -16407,6 +16481,8 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "inBundle": true, "license": "MIT", @@ -16446,6 +16522,8 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "inBundle": true, "license": "MIT", @@ -16474,6 +16552,8 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch": { "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "inBundle": true, "license": "ISC", @@ -16564,6 +16644,8 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "inBundle": true, "license": "ISC", @@ -16649,6 +16731,8 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/signal-exit": { "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true, "inBundle": true, "license": "ISC" @@ -16721,6 +16805,8 @@ }, "node_modules/npm/node_modules/normalize-package-data": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", "dev": true, "inBundle": true, "license": "BSD-2-Clause", @@ -16878,6 +16964,8 @@ }, "node_modules/npm/node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "inBundle": true, "license": "ISC", @@ -16887,6 +16975,8 @@ }, "node_modules/npm/node_modules/p-map": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -16948,6 +17038,8 @@ }, "node_modules/npm/node_modules/path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "inBundle": true, "license": "MIT", @@ -16957,6 +17049,8 @@ }, "node_modules/npm/node_modules/path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "inBundle": true, "license": "MIT", @@ -16991,6 +17085,8 @@ }, "node_modules/npm/node_modules/postcss-selector-parser": { "version": "6.0.13", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", + "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -17152,6 +17248,8 @@ }, "node_modules/npm/node_modules/rimraf": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "inBundle": true, "license": "ISC", @@ -17167,6 +17265,8 @@ }, "node_modules/npm/node_modules/rimraf/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "inBundle": true, "license": "MIT", @@ -17197,6 +17297,8 @@ }, "node_modules/npm/node_modules/rimraf/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "inBundle": true, "license": "ISC", @@ -17209,6 +17311,8 @@ }, "node_modules/npm/node_modules/safe-buffer": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, "inBundle": true, "license": "MIT" @@ -17255,6 +17359,8 @@ }, "node_modules/npm/node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "inBundle": true, "license": "MIT", @@ -17267,6 +17373,8 @@ }, "node_modules/npm/node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "inBundle": true, "license": "MIT", @@ -17276,6 +17384,8 @@ }, "node_modules/npm/node_modules/signal-exit": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", + "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", "dev": true, "inBundle": true, "license": "ISC", @@ -17343,6 +17453,8 @@ }, "node_modules/npm/node_modules/spdx-correct": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, "inBundle": true, "license": "Apache-2.0", @@ -17353,12 +17465,16 @@ }, "node_modules/npm/node_modules/spdx-exceptions": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true, "inBundle": true, "license": "CC-BY-3.0" }, "node_modules/npm/node_modules/spdx-expression-parse": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "inBundle": true, "license": "MIT", @@ -17369,6 +17485,8 @@ }, "node_modules/npm/node_modules/spdx-license-ids": { "version": "3.0.13", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", + "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", "dev": true, "inBundle": true, "license": "CC0-1.0" @@ -17387,6 +17505,8 @@ }, "node_modules/npm/node_modules/string_decoder": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "inBundle": true, "license": "MIT", @@ -17396,6 +17516,8 @@ }, "node_modules/npm/node_modules/string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "inBundle": true, "license": "MIT", @@ -17425,6 +17547,8 @@ }, "node_modules/npm/node_modules/strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "inBundle": true, "license": "MIT", @@ -17450,6 +17574,8 @@ }, "node_modules/npm/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "inBundle": true, "license": "MIT", @@ -17562,12 +17688,16 @@ }, "node_modules/npm/node_modules/util-deprecate": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/validate-npm-package-license": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "inBundle": true, "license": "Apache-2.0", @@ -17664,6 +17794,8 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, "inBundle": true, "license": "MIT", @@ -17688,6 +17820,8 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "inBundle": true, "license": "MIT" @@ -17726,12 +17860,16 @@ }, "node_modules/npm/node_modules/wrappy": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/write-file-atomic": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, "inBundle": true, "license": "ISC", @@ -17745,6 +17883,8 @@ }, "node_modules/npm/node_modules/yallist": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, "inBundle": true, "license": "ISC" From 7cc109768a6a0ddd39edf9d3fb25dbde2eaf7b9e Mon Sep 17 00:00:00 2001 From: Joshua Fernandes Date: Tue, 1 Aug 2023 09:49:47 +1000 Subject: [PATCH 2/3] fusing the version docs in the versions page Signed-off-by: Joshua Fernandes --- docs/configure/search.md | 4 +- docs/configure/versioning/index.md | 147 +++++++++++++++++++++++-- docs/contribute/doc-release-process.md | 119 -------------------- docusaurus.config.js | 64 +++++++---- package-lock.json | 49 +++++++++ package.json | 1 + yarn.lock | 20 +++- 7 files changed, 252 insertions(+), 152 deletions(-) delete mode 100644 docs/contribute/doc-release-process.md diff --git a/docs/configure/search.md b/docs/configure/search.md index 66ff4a8..3cc2604 100644 --- a/docs/configure/search.md +++ b/docs/configure/search.md @@ -18,7 +18,7 @@ the conditions as long as the docs are open source. This page contains instructions for configuring Algolia for both [open-source](#docs-and-source-code-are-open-source) and [closed-source](#source-code-is-not-open-source) projects. -## Docs and source code are open source +## For an open source codebase Follow these steps to configure Algolia in your project: @@ -50,7 +50,7 @@ Follow these steps to configure Algolia in your project: Edit the `docs` index in the file to match your repository's index in Algolia. This workflow runs in the background and populates the index that Algolia uses to search. -## Source code is not open source +## For a close source code base If your project doesn't satisfy the [Algolia checklist](https://docsearch.algolia.com/docs/who-can-apply/), then you can't use Algolia for free. diff --git a/docs/configure/versioning/index.md b/docs/configure/versioning/index.md index 05a3752..4e34b67 100644 --- a/docs/configure/versioning/index.md +++ b/docs/configure/versioning/index.md @@ -3,28 +3,161 @@ description: Support and manage multiple documentation versions. sidebar_position: 1 --- -# Configure versioning +# Configure and use versioning Docusaurus can manage multiple versions of your documentation. See the [Docusaurus versioning documentation](https://docusaurus.io/docs/next/versioning) for detailed context and instructions on managing versions. -## Create a docs version +The following instructions are for documentation that uses n versions that can be accessed like so: + +| Path | Version | URL | +|:----------------------------------- |:------------- |:-------------------| +|versioned_docs/version-0.x/hello.md | 0.x | /0.x/hello | +|versioned_docs/version-1.0/hello.md | 1.0 (latest) | /hello | +|docs/hello.md | development | /development/hello | + +:::info +Please note that unlike Read the Docs (RTD) that versions by tags on the code base, in Docusaurus, +every version in history is kept in the `versioned_docs` folder, so the onus is on you to remove +older versions when required +::: + +Docusaurus nomenclature is slightly different to what we use. In docusaurus, all actual versions +are referred to by name and are sub folders in `versioned_docs`; and the next version is therefore called +`next` (the next version). In Consensys we follow the same for the `versioned_docs` but use the +term `development` instead, and this can be configured in docusaurus.config.js like so, where +the `current` version is given a `label` and `path` attribute. + +```js +... + routeBasePath: "/", + path: "./docs", + includeCurrentVersion: true, + lastVersion: "1.0", + versions: { + //defaults to the ./docs folder + // using 'development' instead of 'next' as path + current: { + label: "development", + path: "development", + }, + //the last stable release in the versioned_docs/version-stable + "1.0": { + label: "1.0", + }, + "0.x": { + label: "0.x", + }, + }, +... +``` + +## Release a new docs version + +### 1. Create a new version of the documentation: -Release version 1.0 of your docs using the following command: +In the following steps, we'll release the `1.0` version of the documentation (`./docs`) as an example. + + + +# Syntax + +```bash +npm run docusaurus docs:version +``` + +This command: + +- Copies the full `docs/` directory into a new `version-` directory in the `versioned_docs` directory. +- Creates a new `versioned_sidebars/version--sidebars.json` file. +- Appends the new version number to the `versions.json` file. + +# Example ```bash npm run docusaurus docs:version 1.0 ``` -The `docs` folder is copied into `versioned_docs/version-1.0` and `versions.json` is created. +This command: + +- Copies the full `docs/` directory into a new `version-1.0` directory in the `versioned_docs` directory. +- Creates a new `versioned_sidebars/version-1.0-sidebars.json` file. +- Appends the new version number to the `versions.json` file. + + Your docs now have two versions: -- `1.0` at `http://localhost:3000/docs/` for the version 1.0 docs -- `current` at `http://localhost:3000/docs/next/` for the upcoming, unreleased docs. +- `1.0` at `http://localhost:3000/` for the version 1.0 docs +- `current` at `http://localhost:3000/next/` for the upcoming, unreleased docs. + +### 2. Update the `docusaurus.config.js` file to re-label these paths + +In `docusaurus.config.js`, under `presets` > `classic` > `docs`: + +- Update the `lastVersion` to the new version number. +- Under `versions`, update the current version to the new version. + +For example, when releasing version `1.0`, update the following section in the `docusaurus.config.js` +file by updating the version number: + +```js +presets: [ + [ + "classic", + { + docs: { + sidebarPath: require.resolve("./sidebars.js"), + // Set a base path separate from default /docs + editUrl: "https://github.com/ConsenSys/doc.teku/tree/master/", + routeBasePath: "/", + path: "./docs", + includeCurrentVersion: true, + // highlight-next-line + lastVersion: "1.0", + versions: { + //defaults to the ./docs folder + // using 'development' instead of 'next' as path + current: { + label: "development", + path: "development", + }, + //the last stable release in the versioned_docs/version-1.0 + // highlight-start + "1.0": { + label: "1.0", + }, + // highlight-end + }, +... +], + +``` + +### 3. Update the `versions.json` file + +:::info +Please remember to remove any old versions that you are not required in this file +::: + +```json +[ + "1.0", + "0.x" +] +``` + +### 4. Delete the previous doc versions (if needed) + +If you have deleted a version in step 3, also delete the artifacts for that version. For example, if deleting version `0.2` that would mean deleting the following: + +1. In the `versioned_docs` directory, delete the `version-0.2` folder +2. In the `versioned_sidebars` directory, delete the `version-0.2-sidebars.json` file. + +Create your pull request. You can perform a final check using the preview link generated for your PR. -## Add a version dropdown +### 5. Add a version dropdown (Do this once only when versioning is introduced) To navigate seamlessly across versions, add a version dropdown by modifying `docusaurus.config.js` as follows: diff --git a/docs/contribute/doc-release-process.md b/docs/contribute/doc-release-process.md deleted file mode 100644 index d34a061..0000000 --- a/docs/contribute/doc-release-process.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -description: Release process for documentation that uses a versioning system. -sidebar_position: 8 ---- - -# Documentation release process - -The following instructions are for documentation that uses the Docusaurus versioning system. - -:::info -Currently, only the Teku documentation utilizes versioning, supporting just two versions: `stable` and `development`. -This means previous releases must be removed as part of the release process. -::: - -A new stable version of the documentation is released when a new version of the software is released. -In the following example we'll release the `23.6.3` version of the documentation (from `23.6.2`). - -## Steps - -You'll need to create a documentation pull request with the following changes: - -### 1. Create a new version of the documentation: - -Create a new documentation version by running the following command: - - - -# Syntax - -```bash -npm run docusaurus docs:version -``` - -# Example - -```bash -npm run docusaurus docs:version 23.6.3 -``` - - - -This command: - -- Copies the full `docs/` directory into a new `version-` directory in the `versioned_docs` directory. -- Creates a new `versioned_sidebars/version--sidebars.json` file -- Appends the new version number to the `versions.json` file. - -### 2. Update the `docusaurus.config.js` file - -In `docusaurus.config.js`, under `presets` > `classic` > `docs`: - -- Update the `lastVersion` to the new version number. -- Under `versions`, update the current stable version to the new version - -For example, when releasing version `23.6.3` (from `23.6.2`), update the following section in the `docusaurus.config.js` -file by updating the version number: - -```javascript -presets: [ - [ - "classic", - { - docs: { - sidebarPath: require.resolve("./sidebars.js"), - // Set a base path separate from default /docs - editUrl: "https://github.com/ConsenSys/doc.teku/tree/master/", - routeBasePath: "/", - path: "./docs", - includeCurrentVersion: true, - // highlight-next-line - lastVersion: "23.6.3", - versions: { - //defaults to the ./docs folder - // using 'development' instead of 'next' as path - current: { - label: "development", - path: "development", - }, - //the last stable release in the versioned_docs/version-stable - // highlight-start - "23.6.3": { - label: "stable (23.6.3)", - }, - // highlight-end - }, -... -], - -``` - -### 3. Update the `versions.json` file - -Delete the previous version from the `versions.json` file: - -Before: - -```json -[ - "23.6.3", - "23.6.2" -] -``` - -After: - -```json -[ - "23.6.3" -] -``` - -### 4. Delete the previous doc versions - -Lastly, we'll cleanup the documentation directory by deleting the previous stable docs. For this example it means: - -1. In the `versioned_docs` directory, delete the `version-23.6.2` folder -2. In the `versioned_sidebars` directory, delete the `version-23.6.2-sidebars.json` file. - -Create your pull request. You can perform a final check using the Preview link that gets created for your PR. \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index 197cb56..846e882 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -93,7 +93,24 @@ const config = { // Set a base path separate from default /docs editUrl: "https://github.com/ConsenSys/docs-template/tree/main/", routeBasePath: "/", - path: "docs", + path: "./docs", + includeCurrentVersion: true, + // lastVersion: "23.x", + // versions: { + // //defaults to the ./docs folder + // // using 'development' instead of 'next' as path + // current: { + // label: "development", + // path: "development", + // }, + // //the last stable release in the versioned_docs/version-stable + // "23.x": { + // label: "stable (23.x)", + // }, + // "22.x": { + // label: "22.x", + // }, + // }, // @ts-ignore // eslint-disable-next-line global-require remarkPlugins: [require("remark-docusaurus-tabs")], @@ -108,7 +125,6 @@ const config = { ], showLastUpdateAuthor: true, showLastUpdateTime: true, - includeCurrentVersion: true, }, theme: { customCss: require.resolve("./src/css/custom.css"), @@ -275,21 +291,6 @@ const config = { language: "nodejs", logoClass: "nodejs", }, - // { - // highlight: "ruby", - // language: "ruby", - // logoClass: "ruby", - // }, - // { - // highlight: "csharp", - // language: "csharp", - // logoClass: "csharp", - // }, - // { - // highlight: "php", - // language: "php", - // logoClass: "php", - // }, ], }), plugins: [ @@ -306,8 +307,33 @@ const config = { containerId: "GTM-", }, ], - ], // remove if not using docusaurus-plugin-openapi-docs - themes: [], // remove if not using docusaurus-plugin-openapi-docs + // This is how redirects are done + // [ + // "@docusaurus/plugin-client-redirects", + // { + // redirects: [ + // { + // from: "/HowTo/Get-Started/Installation-Options/Install-Binaries", + // to: "/get-started/install/install-binaries", + // }, + // ], + // // its quite odd here in that its back to front - replace(to, from) + // createRedirects(existingPath) { + // if (existingPath.includes("/development")) { + // return [ + // existingPath.replace("/development", "/en/latest"), + // existingPath.replace("/development", "/latest"), + // ]; + // } + // if (existingPath.includes("/")) { + // return [existingPath.replace("/", "/stable")]; + // } + // return undefined; // Return a falsy value: no redirect created + // }, + // }, + // ], + ], + themes: [], }; module.exports = config; diff --git a/package-lock.json b/package-lock.json index fc2c60b..e273c38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.19.0", "dependencies": { "@docusaurus/core": "^2.4.1", + "@docusaurus/plugin-client-redirects": "^2.4.1", "@docusaurus/plugin-google-gtag": "^2.4.1", "@docusaurus/plugin-google-tag-manager": "^2.4.1", "@docusaurus/preset-classic": "^2.4.1", @@ -3057,6 +3058,42 @@ "react-dom": "*" } }, + "node_modules/@docusaurus/plugin-client-redirects": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-2.4.1.tgz", + "integrity": "sha512-tp0j16gaLIJ4p+IR0P6KDOFsTOGGMY54MNPnmM61Vaqqt5omLqsuKUO8UlCGU1oW/4EIQOhXYy99XYY5MjE+7A==", + "dependencies": { + "@docusaurus/core": "2.4.1", + "@docusaurus/logger": "2.4.1", + "@docusaurus/utils": "2.4.1", + "@docusaurus/utils-common": "2.4.1", + "@docusaurus/utils-validation": "2.4.1", + "eta": "^2.0.0", + "fs-extra": "^10.1.0", + "lodash": "^4.17.21", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/plugin-client-redirects/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@docusaurus/plugin-content-blog": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.4.1.tgz", @@ -15412,6 +15449,8 @@ }, "node_modules/npm/node_modules/cross-spawn/node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "inBundle": true, "license": "ISC", @@ -15460,6 +15499,8 @@ }, "node_modules/npm/node_modules/debug/node_modules/ms": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true, "inBundle": true, "license": "MIT" @@ -17277,6 +17318,8 @@ }, "node_modules/npm/node_modules/rimraf/node_modules/glob": { "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "inBundle": true, "license": "ISC", @@ -17341,6 +17384,8 @@ }, "node_modules/npm/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "inBundle": true, "license": "ISC", @@ -17808,6 +17853,8 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "inBundle": true, "license": "MIT", @@ -17828,6 +17875,8 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/string-width": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "inBundle": true, "license": "MIT", diff --git a/package.json b/package.json index d552f44..5ba64d6 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ }, "dependencies": { "@docusaurus/core": "^2.4.1", + "@docusaurus/plugin-client-redirects": "^2.4.1", "@docusaurus/plugin-google-gtag": "^2.4.1", "@docusaurus/plugin-google-tag-manager": "^2.4.1", "@docusaurus/preset-classic": "^2.4.1", diff --git a/yarn.lock b/yarn.lock index 3ddc04b..113b1c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1889,6 +1889,21 @@ react-helmet-async "*" react-loadable "npm:@docusaurus/react-loadable@5.5.2" +"@docusaurus/plugin-client-redirects@^2.4.1": + version "2.4.1" + resolved "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-2.4.1.tgz" + integrity sha512-tp0j16gaLIJ4p+IR0P6KDOFsTOGGMY54MNPnmM61Vaqqt5omLqsuKUO8UlCGU1oW/4EIQOhXYy99XYY5MjE+7A== + dependencies: + "@docusaurus/core" "2.4.1" + "@docusaurus/logger" "2.4.1" + "@docusaurus/utils" "2.4.1" + "@docusaurus/utils-common" "2.4.1" + "@docusaurus/utils-validation" "2.4.1" + eta "^2.0.0" + fs-extra "^10.1.0" + lodash "^4.17.21" + tslib "^2.4.0" + "@docusaurus/plugin-content-blog@2.4.1": version "2.4.1" resolved "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.4.1.tgz" @@ -6828,11 +6843,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" From f81853788a20e0b842d5b5bcd500985c0829d667 Mon Sep 17 00:00:00 2001 From: bgravenorst Date: Mon, 28 Aug 2023 10:52:04 +1000 Subject: [PATCH 3/3] Minor updates. Signed-off-by: bgravenorst --- docs/configure/versioning/index.md | 2 +- package-lock.json | 12 ------------ yarn.lock | 5 +++++ 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/docs/configure/versioning/index.md b/docs/configure/versioning/index.md index 4e34b67..4564523 100644 --- a/docs/configure/versioning/index.md +++ b/docs/configure/versioning/index.md @@ -191,4 +191,4 @@ The docs version dropdown appears in your navbar: You can edit versioned docs in their respective folder: - `versioned_docs/version-1.0/hello.md` updates `http://localhost:3000/docs/hello`. -- `docs/hello.md` updates `http://localhost:3000/docs/next/hello`. +- `docs/hello.md` updates `http://localhost:3000/docs/development/hello`. diff --git a/package-lock.json b/package-lock.json index e273c38..17827f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15449,8 +15449,6 @@ }, "node_modules/npm/node_modules/cross-spawn/node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "inBundle": true, "license": "ISC", @@ -15499,8 +15497,6 @@ }, "node_modules/npm/node_modules/debug/node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true, "inBundle": true, "license": "MIT" @@ -17318,8 +17314,6 @@ }, "node_modules/npm/node_modules/rimraf/node_modules/glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "inBundle": true, "license": "ISC", @@ -17384,8 +17378,6 @@ }, "node_modules/npm/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "inBundle": true, "license": "ISC", @@ -17853,8 +17845,6 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "inBundle": true, "license": "MIT", @@ -17875,8 +17865,6 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "inBundle": true, "license": "MIT", diff --git a/yarn.lock b/yarn.lock index 113b1c8..b4f47d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6843,6 +6843,11 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"