update docusaurus to latest version (#14728)

This commit is contained in:
William Cheng 2023-02-17 14:15:29 +08:00 committed by GitHub
parent 2bc963f00c
commit cea5022b5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4934 additions and 6997 deletions

View File

@ -215,15 +215,15 @@ after_success:
echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME";
fi;
fi;
## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
#- if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
# cd website;
# git config --global user.name "${GH_NAME}";
# git config --global user.email "${GH_EMAIL}";
# echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
# yarn install;
# GIT_USER="${GH_NAME}" yarn run publish-gh-pages;
# fi;
# publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
- if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
cd website;
git config --global user.name "${GH_NAME}";
git config --global user.email "${GH_EMAIL}";
echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
yarn install;
GIT_USER="${GH_NAME}" yarn run publish-gh-pages;
fi;
env:
- 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

View File

@ -25,14 +25,12 @@ const docusaurusConfig = {
// // template. For example, if you need your repo's URL...
// repoUrl: 'https://github.com/OpenAPITools/openapi-generator',
plugins: ['@docusaurus/plugin-google-analytics'],
//plugins: ['@docusaurus/plugin-google-analytics'],
themeConfig: {
// Open Graph and Twitter card images.
image: 'img/docusaurus.png',
sidebarCollapsible: true,
prism: {
theme: require('prism-react-renderer/themes/dracula'),
defaultLanguage: 'bash',
@ -45,7 +43,7 @@ const docusaurusConfig = {
alt: 'OpenAPI Tools logo',
},
links: [
items: [
{to: 'docs/installation', label: 'Getting Started'},
{to: 'docs/generators', label: 'Generators'},
{to: 'docs/roadmap', label: 'Roadmap'},
@ -56,17 +54,12 @@ const docusaurusConfig = {
],
},
googleAnalytics: {
trackingID: 'UA-132927057-1',
},
algolia: {
apiKey: '28e55aff9bab37236baa1c5f0f84f4bb',
appId: 'MVE1LN4DBI',
apiKey: '3c3f7f355de15fa3f392264b2e7a5300',
indexName: 'openapi-generator',
algoliaOptions: { advancedSyntax: true, hitsPerPage: 5},
},
footer: {
style: 'dark',
@ -153,6 +146,7 @@ const docusaurusConfig = {
*/
docLayoutComponent: '@theme/DocPage',
docItemComponent: '@theme/DocItem',
sidebarCollapsible: true,
editUrl: 'https://github.com/OpenAPITools/openapi-generator/edit/master/website',
@ -166,6 +160,10 @@ const docusaurusConfig = {
// Equivalent to `enableUpdateTime`.
showLastUpdateTime: true,
},
googleAnalytics: {
trackingID: 'UA-132927057-1',
},
},
],
],

View File

@ -12,10 +12,10 @@
},
"devDependencies": {},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.40",
"@docusaurus/plugin-google-analytics": "^2.0.0-alpha.37",
"@docusaurus/preset-classic": "2.0.0-alpha.40",
"@docusaurus/utils": "2.0.0-alpha.40",
"@docusaurus/core": "^2.3.1",
"@docusaurus/plugin-google-analytics": "^2.3.1",
"@docusaurus/preset-classic": "^2.3.1",
"@docusaurus/utils": "^2.3.1",
"classnames": "^2.2.6",
"js-yaml": "^3.12.0",
"lodash.merge": "^4.6.2",

File diff suppressed because it is too large Load Diff