1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2026-05-22 08:55:42 +02:00
Files
woodpecker/docs/docusaurus.config.ts
T

301 lines
7.5 KiB
TypeScript
Raw Normal View History

2023-11-05 10:43:44 +01:00
import { themes } from 'prism-react-renderer';
2023-11-05 12:47:42 +01:00
import type { Config } from '@docusaurus/types';
2023-11-05 10:43:44 +01:00
import type * as Preset from '@docusaurus/preset-classic';
import * as path from 'path';
2024-12-08 12:00:09 +01:00
const config = {
title: 'Woodpecker CI',
2024-08-05 01:27:25 +02:00
tagline: 'Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.',
2021-10-14 18:13:57 +02:00
url: 'https://woodpecker-ci.org',
baseUrl: '/',
onBrokenLinks: 'throw',
2021-10-16 21:27:51 +02:00
onBrokenMarkdownLinks: 'throw',
2024-04-25 08:29:49 +02:00
onBrokenAnchors: 'throw',
2021-10-16 21:27:51 +02:00
onDuplicateRoutes: 'throw',
organizationName: 'woodpecker-ci',
projectName: 'woodpecker-ci.github.io',
trailingSlash: false,
2024-06-26 20:54:12 +02:00
headTags: [
{
tagName: 'link',
attributes: {
href: 'https://floss.social/@WoodpeckerCI',
rel: 'me',
},
},
],
2023-11-05 12:47:42 +01:00
themeConfig: {
navbar: {
title: 'Woodpecker',
logo: {
alt: 'Woodpecker Logo',
src: 'img/logo.svg',
},
2023-11-05 12:47:42 +01:00
items: [
{
type: 'doc',
2024-07-18 05:57:03 -07:00
docId: 'intro/index',
2023-11-05 12:47:42 +01:00
activeBaseRegex: 'docs/(?!migrations|awesome)',
position: 'left',
label: 'Docs',
},
{
to: '/plugins',
position: 'left',
label: 'Plugins',
},
2024-06-01 08:34:17 +02:00
{ to: 'blog', label: 'Blog', position: 'left' },
2023-11-05 12:47:42 +01:00
{
2024-06-01 08:34:17 +02:00
label: 'More Resources',
2023-11-05 12:47:42 +01:00
position: 'left',
2024-06-01 08:34:17 +02:00
items: [
{
2024-11-05 03:32:45 +01:00
to: '/migrations', // Always point to newest migration guide
activeBaseRegex: 'migrations',
2024-06-01 08:34:17 +02:00
label: 'Migrations',
},
{
2024-11-05 03:32:45 +01:00
to: '/awesome', // Always point to newest awesome list
activeBaseRegex: 'awesome',
2024-06-01 08:34:17 +02:00
label: 'Awesome',
},
{
to: '/api',
label: 'API',
},
],
2023-11-05 12:47:42 +01:00
},
{
type: 'docsVersionDropdown',
position: 'right',
2024-06-04 10:14:39 +02:00
dropdownItemsAfter: [
{
to: '/versions',
label: 'All versions',
},
],
2023-11-05 12:47:42 +01:00
},
{
href: 'https://github.com/woodpecker-ci/woodpecker',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
{
label: '🧡 Sponsor Us',
position: 'right',
href: 'https://opencollective.com/woodpecker-ci',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Introduction',
to: '/docs/intro',
},
{
label: 'Usage',
to: '/docs/usage/intro',
},
{
label: 'Server setup',
2024-07-18 05:57:03 -07:00
to: '/docs/administration/getting-started',
2023-11-05 12:47:42 +01:00
},
],
},
{
title: 'Community',
items: [
{
label: 'Matrix',
href: 'https://matrix.to/#/#woodpecker:matrix.org',
},
{
label: 'Mastodon',
href: 'https://floss.social/@WoodpeckerCI',
},
2024-01-07 13:48:08 +01:00
{
label: 'X',
href: 'https://twitter.com/woodpeckerci',
},
2023-11-05 12:47:42 +01:00
],
},
{
title: 'More',
items: [
{
label: 'Translate',
href: 'https://translate.woodpecker-ci.org/engage/woodpecker-ci/',
},
{
label: 'GitHub',
href: 'https://github.com/woodpecker-ci/woodpecker',
},
{
2024-01-11 18:43:54 +01:00
href: 'https://ci.woodpecker-ci.org/repos/3780',
2023-11-05 12:47:42 +01:00
label: 'CI',
},
2024-01-25 22:41:05 -08:00
{
href: 'https://opencollective.com/woodpecker-ci',
label: 'Open Collective',
},
2023-11-05 12:47:42 +01:00
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Woodpecker Authors. Built with Docusaurus.`,
2023-11-05 12:47:42 +01:00
},
prism: {
theme: themes.github,
darkTheme: themes.dracula,
2024-01-11 18:43:54 +01:00
additionalLanguages: [
'diff',
'json',
'docker',
'javascript',
'css',
'bash',
'nginx',
'apacheconf',
'ini',
'nix',
'uri',
],
2023-11-05 12:47:42 +01:00
},
announcementBar: {
id: 'github-star',
content: ` If you like Woodpecker-CI, <a href=https://github.com/woodpecker-ci/woodpecker rel="noopener noreferrer" target="_blank">give us a star on GitHub</a> ! ⭐️`,
backgroundColor: 'var(--ifm-color-primary)',
textColor: 'var(--ifm-color-gray-900)',
},
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 4,
},
colorMode: {
respectPrefersColorScheme: true,
},
} satisfies Preset.ThemeConfig,
2022-04-06 17:15:28 +02:00
plugins: [
() => ({
name: 'docusaurus-plugin-favicon',
injectHtmlTags() {
return {
headTags: [
{
tagName: 'link',
attributes: {
rel: 'icon',
href: '/img/favicon.ico',
sizes: 'any',
},
},
{
tagName: 'link',
attributes: {
rel: 'icon',
href: '/img/favicon.svg',
type: 'image/svg+xml',
},
},
],
};
},
}),
() => ({
name: 'webpack-config',
configureWebpack() {
return {
devServer: {
client: {
webSocketURL: 'auto://0.0.0.0:0/ws',
},
},
2024-06-01 08:34:17 +02:00
} as any;
},
}),
2022-04-06 17:15:28 +02:00
],
themes: [
path.resolve(__dirname, 'plugins', 'woodpecker-plugins', 'dist'),
[
2022-09-25 19:04:47 +02:00
require.resolve('@easyops-cn/docusaurus-search-local'),
{
hashed: true,
},
],
],
presets: [
[
'@docusaurus/preset-classic',
2023-11-05 12:47:42 +01:00
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
2023-07-31 05:47:23 +02:00
editUrl: 'https://github.com/woodpecker-ci/woodpecker/edit/main/docs/',
2022-09-01 01:52:52 +02:00
includeCurrentVersion: true,
2024-11-28 19:50:14 +01:00
lastVersion: '2.8',
2024-06-01 08:34:17 +02:00
onlyIncludeVersions:
2024-11-28 19:50:14 +01:00
process.env.NODE_ENV === 'development' ? ['current', '2.8'] : ['current', '2.8', '2.7', '2.6', '1.0'],
2022-09-01 01:52:52 +02:00
versions: {
2023-10-24 14:42:05 +02:00
current: {
2024-06-04 10:14:39 +02:00
label: 'Next 🚧',
2022-09-01 01:52:52 +02:00
banner: 'unreleased',
},
2024-11-28 19:50:14 +01:00
'2.8': {
label: '2.8.x',
},
2024-07-18 05:57:03 -07:00
'2.7': {
2024-12-08 12:00:09 +01:00
label: '2.7.x 💀',
2024-11-28 19:50:14 +01:00
banner: 'unmaintained',
2024-07-18 05:57:03 -07:00
},
2024-06-13 19:31:54 +02:00
'2.6': {
2024-07-18 05:57:03 -07:00
label: '2.6.x 💀',
banner: 'unmaintained',
2024-06-13 19:31:54 +02:00
},
2023-07-25 12:41:58 +02:00
'1.0': {
2024-06-04 10:14:39 +02:00
label: '1.0.x 💀',
2023-11-14 14:45:44 +01:00
banner: 'unmaintained',
2023-07-25 12:41:58 +02:00
},
2022-09-01 01:52:52 +02:00
},
},
2023-07-11 23:31:45 +02:00
blog: {
2023-08-09 15:23:13 +02:00
blogTitle: 'Blog',
blogDescription: 'A blog for release announcements, turorials...',
2024-08-15 19:54:52 +02:00
onInlineAuthors: 'ignore',
2023-07-11 23:31:45 +02:00
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
2023-11-05 12:47:42 +01:00
} satisfies Preset.Options,
],
[
'redocusaurus',
{
// Plugin Options for loading OpenAPI files
specs: [
{
2024-11-23 09:17:19 +01:00
spec: 'openapi.json',
route: '/api/',
},
],
// Theme Options for modifying how redoc renders them
theme: {
// Change with your site colors
primaryColor: '#1890ff',
},
},
],
],
2023-11-05 10:43:44 +01:00
markdown: {
2023-11-05 12:47:42 +01:00
format: 'detect',
},
2024-12-08 12:00:09 +01:00
future: {
experimental_faster: true,
},
} satisfies Config;
2023-11-05 10:43:44 +01:00
export default config;