Use local search and update docusaurus (#1093)

This commit is contained in:
Anbraten 2022-08-14 09:19:24 +02:00 committed by GitHub
parent 7a4827bbf6
commit fdf5fd3f69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2070 additions and 2179 deletions

View file

@ -1,15 +1,19 @@
variables:
- &node_image 'node:16-alpine'
- &when_path
- "docs/**"
- ".woodpecker/docs.yml"
pipeline:
build:
image: node:14-alpine
image: *node_image
commands:
- cd docs/
- yarn install --frozen-lockfile
- yarn build
when:
event: [push, pull_request]
path:
- "docs/**"
- ".woodpecker/docs.yml"
path: *when_path
deploy-preview:
image: woodpeckerci/plugin-surge-preview:next
@ -23,9 +27,8 @@ pipeline:
from_secret: GITHUB_TOKEN_SURGE
when:
event: pull_request
path:
- "docs/**"
- ".woodpecker/docs.yml"
path: *when_path
# TODO: add step to remove preview again after PR is closed (waiting for #286)
deploy:
@ -52,7 +55,4 @@ pipeline:
when:
event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
path:
- "docs/**"
- ".woodpecker/docs.yml"
path: *when_path

View file

@ -126,12 +126,6 @@ module.exports = {
backgroundColor: 'var(--ifm-color-primary)',
textColor: 'var(--ifm-color-gray-900)',
},
algolia: {
appId: 'BH4D9OD16A',
apiKey: '148f85e216b68d20ffa49d46a2b89d0e',
indexName: 'woodpecker-ci',
debug: false, // Set debug to true if you want to inspect the modal
},
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 4,
@ -164,7 +158,15 @@ module.exports = {
},
}),
],
themes: [path.resolve(__dirname, 'plugins', 'woodpecker-plugins', 'dist')],
themes: [
path.resolve(__dirname, 'plugins', 'woodpecker-plugins', 'dist'),
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
hashed: true,
},
],
],
presets: [
[
'@docusaurus/preset-classic',

View file

@ -15,14 +15,14 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^2.0.0-beta.18",
"@docusaurus/preset-classic": "^2.0.0-beta.18",
"@docusaurus/theme-search-algolia": "^2.0.0-beta.18",
"@docusaurus/core": "^2.0.1",
"@docusaurus/preset-classic": "^2.0.1",
"@easyops-cn/docusaurus-search-local": "^0.31.0",
"@mdx-js/react": "^1.6.22",
"@svgr/webpack": "^6.2.1",
"clsx": "^1.1.1",
"@svgr/webpack": "^6.3.1",
"clsx": "^1.2.1",
"file-loader": "^6.2.0",
"prism-react-renderer": "^1.3.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"url-loader": "^4.1.1"
@ -40,11 +40,11 @@
]
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.0.0-beta.18",
"@tsconfig/docusaurus": "^1.0.5",
"@types/react": "^17.0.43",
"@docusaurus/module-type-aliases": "^2.0.1",
"@tsconfig/docusaurus": "^1.0.6",
"@types/react": "^18.0.17",
"@types/react-helmet": "^6.1.5",
"@types/react-router-dom": "^5.3.3",
"typescript": "^4.6.3"
"typescript": "^4.7.4"
}
}

File diff suppressed because it is too large Load diff