Use docusaurus faster (#4528)

This commit is contained in:
Anbraten 2024-12-08 12:00:09 +01:00 committed by GitHub
parent 2deefb3f2c
commit d35d950c44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1211 additions and 1096 deletions

View file

@ -1,3 +0,0 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};

View file

@ -3,7 +3,7 @@ import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic'; import type * as Preset from '@docusaurus/preset-classic';
import * as path from 'path'; import * as path from 'path';
const config: Config = { const config = {
title: 'Woodpecker CI', title: 'Woodpecker CI',
tagline: 'Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.', tagline: 'Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.',
url: 'https://woodpecker-ci.org', url: 'https://woodpecker-ci.org',
@ -248,7 +248,7 @@ const config: Config = {
label: '2.8.x', label: '2.8.x',
}, },
'2.7': { '2.7': {
label: '2.7.x', label: '2.7.x 💀',
banner: 'unmaintained', banner: 'unmaintained',
}, },
'2.6': { '2.6': {
@ -265,8 +265,6 @@ const config: Config = {
blogTitle: 'Blog', blogTitle: 'Blog',
blogDescription: 'A blog for release announcements, turorials...', blogDescription: 'A blog for release announcements, turorials...',
onInlineAuthors: 'ignore', onInlineAuthors: 'ignore',
// postsPerPage: 'ALL',
// blogSidebarCount: 0,
}, },
theme: { theme: {
customCss: require.resolve('./src/css/custom.css'), customCss: require.resolve('./src/css/custom.css'),
@ -291,19 +289,12 @@ const config: Config = {
}, },
], ],
], ],
webpack: {
jsLoader: (isServer) => ({
loader: require.resolve('esbuild-loader'),
options: {
loader: 'tsx',
target: isServer ? 'node12' : 'es2017',
supported: { 'dynamic-import': false },
},
}),
},
markdown: { markdown: {
format: 'detect', format: 'detect',
}, },
}; future: {
experimental_faster: true,
},
} satisfies Config;
export default config; export default config;

View file

@ -15,19 +15,15 @@
}, },
"dependencies": { "dependencies": {
"@docusaurus/core": "^3.6.3", "@docusaurus/core": "^3.6.3",
"@docusaurus/faster": "^3.6.3",
"@docusaurus/plugin-content-blog": "^3.6.3", "@docusaurus/plugin-content-blog": "^3.6.3",
"@docusaurus/preset-classic": "^3.6.3", "@docusaurus/preset-classic": "^3.6.3",
"@easyops-cn/docusaurus-search-local": "^0.46.0", "@easyops-cn/docusaurus-search-local": "^0.46.0",
"@mdx-js/react": "^3.1.0",
"@svgr/webpack": "^8.1.0",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"esbuild-loader": "^4.2.2",
"file-loader": "^6.2.0",
"prism-react-renderer": "^2.4.0", "prism-react-renderer": "^2.4.0",
"react": "^19.0.0", "react": "^18.3.1",
"react-dom": "^19.0.0", "react-dom": "^18.3.1",
"redocusaurus": "^2.2.0", "redocusaurus": "^2.2.0"
"url-loader": "^4.1.1"
}, },
"browserslist": { "browserslist": {
"production": [ "production": [
@ -46,16 +42,9 @@
"@docusaurus/tsconfig": "3.6.3", "@docusaurus/tsconfig": "3.6.3",
"@docusaurus/types": "^3.6.3", "@docusaurus/types": "^3.6.3",
"@types/node": "^22.9.3", "@types/node": "^22.9.3",
"@types/react": "^19.0.0", "@types/react": "^18.3.1",
"@types/react-helmet": "^6.1.11", "@types/react-helmet": "^6.1.11",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
"typescript": "^5.7.2" "typescript": "^5.7.2"
},
"pnpm": {
"overrides": {
"got": "^14.0.0",
"path-to-regexp": "^3.3.0",
"cookie": "^1.0.0"
}
} }
} }

File diff suppressed because it is too large Load diff