Skip to content

Commit cea5022

Browse files
authored
update docusaurus to latest version (#14728)
1 parent 2bc963f commit cea5022

File tree

4 files changed

+5044
-7107
lines changed

4 files changed

+5044
-7107
lines changed

.travis.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,15 @@ after_success:
215215
echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME";
216216
fi;
217217
fi;
218-
## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
219-
#- if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
220-
# cd website;
221-
# git config --global user.name "${GH_NAME}";
222-
# git config --global user.email "${GH_EMAIL}";
223-
# echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
224-
# yarn install;
225-
# GIT_USER="${GH_NAME}" yarn run publish-gh-pages;
226-
# fi;
218+
# publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
219+
- if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
220+
cd website;
221+
git config --global user.name "${GH_NAME}";
222+
git config --global user.email "${GH_EMAIL}";
223+
echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
224+
yarn install;
225+
GIT_USER="${GH_NAME}" yarn run publish-gh-pages;
226+
fi;
227227

228228
env:
229229
- DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5

website/docusaurus.config.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ const docusaurusConfig = {
2525
// // template. For example, if you need your repo's URL...
2626
// repoUrl: 'https://github.com/OpenAPITools/openapi-generator',
2727

28-
plugins: ['@docusaurus/plugin-google-analytics'],
28+
//plugins: ['@docusaurus/plugin-google-analytics'],
2929

3030
themeConfig: {
3131
// Open Graph and Twitter card images.
3232
image: 'img/docusaurus.png',
3333

34-
sidebarCollapsible: true,
35-
3634
prism: {
3735
theme: require('prism-react-renderer/themes/dracula'),
3836
defaultLanguage: 'bash',
@@ -45,7 +43,7 @@ const docusaurusConfig = {
4543
alt: 'OpenAPI Tools logo',
4644
},
4745

48-
links: [
46+
items: [
4947
{to: 'docs/installation', label: 'Getting Started'},
5048
{to: 'docs/generators', label: 'Generators'},
5149
{to: 'docs/roadmap', label: 'Roadmap'},
@@ -56,17 +54,12 @@ const docusaurusConfig = {
5654
],
5755
},
5856

59-
googleAnalytics: {
60-
trackingID: 'UA-132927057-1',
61-
},
62-
6357
algolia: {
64-
apiKey: '28e55aff9bab37236baa1c5f0f84f4bb',
58+
appId: 'MVE1LN4DBI',
59+
apiKey: '3c3f7f355de15fa3f392264b2e7a5300',
6560
indexName: 'openapi-generator',
66-
algoliaOptions: { advancedSyntax: true, hitsPerPage: 5},
6761
},
6862

69-
7063
footer: {
7164
style: 'dark',
7265

@@ -153,6 +146,7 @@ const docusaurusConfig = {
153146
*/
154147
docLayoutComponent: '@theme/DocPage',
155148
docItemComponent: '@theme/DocItem',
149+
sidebarCollapsible: true,
156150

157151
editUrl: 'https://github.com/OpenAPITools/openapi-generator/edit/master/website',
158152

@@ -166,6 +160,10 @@ const docusaurusConfig = {
166160
// Equivalent to `enableUpdateTime`.
167161
showLastUpdateTime: true,
168162
},
163+
164+
googleAnalytics: {
165+
trackingID: 'UA-132927057-1',
166+
},
169167
},
170168
],
171169
],

website/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
},
1313
"devDependencies": {},
1414
"dependencies": {
15-
"@docusaurus/core": "2.0.0-alpha.40",
16-
"@docusaurus/plugin-google-analytics": "^2.0.0-alpha.37",
17-
"@docusaurus/preset-classic": "2.0.0-alpha.40",
18-
"@docusaurus/utils": "2.0.0-alpha.40",
15+
"@docusaurus/core": "^2.3.1",
16+
"@docusaurus/plugin-google-analytics": "^2.3.1",
17+
"@docusaurus/preset-classic": "^2.3.1",
18+
"@docusaurus/utils": "^2.3.1",
1919
"classnames": "^2.2.6",
2020
"js-yaml": "^3.12.0",
2121
"lodash.merge": "^4.6.2",

0 commit comments

Comments
 (0)