From f8eecadedb7521741f86521df91749d02bed0c95 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Wed, 19 Jul 2023 13:38:32 -0400 Subject: [PATCH] Update docusaurus.config.js Update .gitea/workflows/build-and-publish.yaml Delete versioned_sidebars/version-1.19-sidebars.json Update loop_docs.sh Update versions.json Update docusaurus.config.js --- .gitea/workflows/build-and-publish.yaml | 8 +- docusaurus.config.js | 21 ++-- loop_docs.sh | 9 +- versioned_sidebars/version-1.19-sidebars.json | 97 ------------------- versions.json | 3 +- 5 files changed, 11 insertions(+), 127 deletions(-) delete mode 100644 versioned_sidebars/version-1.19-sidebars.json diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml index aa7946b7..1ea5f919 100644 --- a/.gitea/workflows/build-and-publish.yaml +++ b/.gitea/workflows/build-and-publish.yaml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: https://github.com/actions/setup-node@v3 with: - node-version: 16 + node-version: 20 - name: install necessary tools run: | apt update -y && apt install -y rsync python python3-pip @@ -26,13 +26,9 @@ jobs: run: | make prepare\#20 make prepare-zh-cn\#20 - - name: prepare 1.19 docs - run: | - make prepare\#19 - make prepare-zh-cn\#19 - name: prepare awesome list run: | - make prepare-awesome-latest prepare-awesome\#20 prepare-awesome\#19 + make prepare-awesome-latest prepare-awesome\#20 - name: cleanup before build run: | rm static/_* diff --git a/docusaurus.config.js b/docusaurus.config.js index 6faf6336..32d9781a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -27,11 +27,7 @@ const apiConfig = [ { route: '/api/1.20/', spec: 'static/swagger-20.json', - }, - { - route: '/api/1.19/', - spec: 'static/swagger-19.json', - }, + } ]: [], // Theme Options for modifying how redoc renders them theme: { @@ -93,14 +89,10 @@ const config = { banner: 'unreleased', }, '1.20': { - label: '1.20.0-rc2', - banner: 'none', - }, - '1.19': { - label: '1.19.4', + label: '1.20.0', } }, - lastVersion: '1.19', + lastVersion: '1.20', async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) { const {item} = args; // Use the provided data to generate a custom sidebar slice @@ -163,10 +155,10 @@ const config = { label: 'Docs', }, { - to: '/api/1.19/', + to: '/api/1.20/', label: 'API', position: 'left', - activeBaseRegex: 'api/(1.19|1.20|next)/', + activeBaseRegex: 'api/(1.20|next)/', }, { position: 'left', @@ -181,8 +173,7 @@ const config = { position: 'right', items: [ {to: '/api/next/', label: '1.21-dev' }, - {to: '/api/1.20/', label: '1.20.0-rc2' }, - {to: '/api/1.19/', label: '1.19.4' }, + {to: '/api/1.20/', label: '1.20.0' } ], }, { diff --git a/loop_docs.sh b/loop_docs.sh index 8f557362..dfbc9a07 100755 --- a/loop_docs.sh +++ b/loop_docs.sh @@ -23,11 +23,8 @@ minNodeVer="16" minGoVer="1.20" goVer="1.20" minorVer="main-nightly" -if [ "$version" == "1.19" ]; then - minorVer="1.19.4" - minGoVer="1.19" -elif [ "$version" == "1.20" ]; then - minorVer="1.20.0-rc2" +if [ "$version" == "1.20" ]; then + minorVer="1.20.0" fi docs_dir="versioned_docs/version-$version" @@ -62,8 +59,6 @@ if [ "$version" == "latest" ]; then SED_INPLACE 's/"version": "{{AppVer | JSEscape | Safe}}"/"version": "1.21-dev"/' static/swagger-latest.json elif [ "$version" == "1.20" ]; then SED_INPLACE 's/"version": "{{AppVer | JSEscape | Safe}}"/"version": "1.20.0-rc2"/' static/swagger-20.json -elif [ "$version" == "1.19" ]; then - SED_INPLACE 's/"version": "{{AppVer | JSEscape | Safe}}"/"version": "1.19.4"/' static/swagger-19.json fi SED_INPLACE 's/"basePath": "{{AppSubUrl | JSEscape | Safe}}/"basePath": "https:\/\/gitea.com/' static/swagger-"$1".json diff --git a/versioned_sidebars/version-1.19-sidebars.json b/versioned_sidebars/version-1.19-sidebars.json deleted file mode 100644 index af983c3f..00000000 --- a/versioned_sidebars/version-1.19-sidebars.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "docs": [ - { - "type": "doc", - "id": "intro", - "label": "What is Gitea?" - }, - { - "type": "category", - "label": "Installation", - "link": { - "type": "generated-index" - }, - "items": [ - { - "type": "autogenerated", - "dirName": "installation" - } - ] - }, - { - "type": "category", - "label": "Administration", - "link": { - "type": "generated-index" - }, - "items": [ - { - "type": "autogenerated", - "dirName": "administration" - } - ] - }, - { - "type": "category", - "label": "Usage", - "link": { - "type": "generated-index" - }, - "items": [ - { - "type": "category", - "label": "Packages", - "items": [ - { - "type": "autogenerated", - "dirName": "packages" - } - ] - }, - { - "type": "autogenerated", - "dirName": "usage" - } - ] - }, - { - "type": "category", - "label": "Development", - "link": { - "type": "generated-index" - }, - "items": [ - { - "type": "autogenerated", - "dirName": "development" - } - ] - }, - { - "type": "category", - "label": "Contributing", - "link": { - "type": "generated-index" - }, - "items": [ - { - "type": "autogenerated", - "dirName": "contributing" - } - ] - }, - { - "type": "category", - "label": "Help", - "link": { - "type": "generated-index" - }, - "items": [ - { - "type": "autogenerated", - "dirName": "help" - } - ] - } - ] -} diff --git a/versions.json b/versions.json index ced0695d..4686147c 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,3 @@ [ - "1.20", - "1.19" + "1.20" ]