2023-11-05 11:43:44 +02:00
import { themes } from 'prism-react-renderer' ;
2023-11-05 13:47:42 +02:00
import type { Config } from '@docusaurus/types' ;
2023-11-05 11:43:44 +02:00
import type * as Preset from '@docusaurus/preset-classic' ;
import * as path from 'path' ;
2021-09-11 17:10:32 +02:00
2023-11-05 11:43:44 +02:00
const config : Config = {
2021-09-11 17:10:32 +02:00
title : 'Woodpecker CI' ,
2023-12-19 15:12:18 +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' ,
2021-09-11 17:10:32 +02:00
baseUrl : '/' ,
onBrokenLinks : 'throw' ,
2021-10-16 21:27:51 +02:00
onBrokenMarkdownLinks : 'throw' ,
onDuplicateRoutes : 'throw' ,
2021-09-11 17:10:32 +02:00
organizationName : 'woodpecker-ci' ,
projectName : 'woodpecker-ci.github.io' ,
trailingSlash : false ,
2023-11-05 13:47:42 +02:00
themeConfig : {
navbar : {
title : 'Woodpecker' ,
logo : {
alt : 'Woodpecker Logo' ,
src : 'img/logo.svg' ,
2022-10-08 10:53:42 +02:00
} ,
2023-11-05 13:47:42 +02:00
items : [
{
type : 'doc' ,
docId : 'intro' ,
activeBaseRegex : 'docs/(?!migrations|awesome)' ,
position : 'left' ,
label : 'Docs' ,
} ,
{
to : '/plugins' ,
position : 'left' ,
label : 'Plugins' ,
} ,
{
to : '/docs/next/migrations' , // Always point to newest migration guide
activeBaseRegex : 'docs/(next/)?migrations' ,
position : 'left' ,
label : 'Migrations' ,
} ,
{
to : '/faq' ,
position : 'left' ,
label : 'FAQ' ,
} ,
{
to : '/docs/next/awesome' , // Always point to newest awesome list
activeBaseRegex : 'docs/(next/)?awesome' ,
position : 'left' ,
label : 'Awesome' ,
} ,
{
to : '/api' ,
position : 'left' ,
label : 'API' ,
} ,
{ to : 'blog' , label : 'Blog' , position : 'left' } ,
2023-12-23 13:27:36 +02:00
{ to : 'cookbook' , label : 'Cookbook' , position : 'left' } ,
2023-11-05 13:47:42 +02:00
{
type : 'docsVersionDropdown' ,
position : 'right' ,
} ,
{
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' ,
2023-11-23 18:00:54 +02:00
to : '/docs/administration/deployment/overview' ,
2023-11-05 13:47:42 +02:00
} ,
{
label : 'FAQ' ,
to : '/faq' ,
} ,
] ,
} ,
{
title : 'Community' ,
items : [
{
label : 'Discord' ,
href : 'https://discord.gg/fcMQqSMXJy' ,
} ,
{
label : 'Matrix' ,
href : 'https://matrix.to/#/#woodpecker:matrix.org' ,
} ,
{
label : 'Mastodon' ,
href : 'https://floss.social/@WoodpeckerCI' ,
} ,
2024-01-07 14:48:08 +02:00
{
label : 'X' ,
href : 'https://twitter.com/woodpeckerci' ,
} ,
2023-11-05 13:47:42 +02: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 19:43:54 +02:00
href : 'https://ci.woodpecker-ci.org/repos/3780' ,
2023-11-05 13:47:42 +02:00
label : 'CI' ,
} ,
2024-01-26 08:41:05 +02:00
{
href : 'https://opencollective.com/woodpecker-ci' ,
label : 'Open Collective' ,
} ,
2023-11-05 13:47:42 +02:00
] ,
} ,
] ,
copyright : ` Copyright © ${ new Date ( ) . getFullYear ( ) } Woodpecker CI. Built with Docusaurus. ` ,
} ,
prism : {
theme : themes.github ,
darkTheme : themes.dracula ,
2024-01-11 19:43:54 +02:00
additionalLanguages : [
'diff' ,
'json' ,
'docker' ,
'javascript' ,
'css' ,
'bash' ,
'nginx' ,
'apacheconf' ,
'ini' ,
'nix' ,
'uri' ,
] ,
2023-11-05 13:47:42 +02: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' ,
} ,
} ,
] ,
} ;
} ,
} ) ,
2022-10-19 18:05:29 +02:00
( ) = > ( {
name : 'webpack-config' ,
configureWebpack() {
return {
devServer : {
client : {
webSocketURL : 'auto://0.0.0.0:0/ws' ,
} ,
} ,
} ;
} ,
} ) ,
2023-12-23 13:27:36 +02:00
[
'@docusaurus/plugin-content-blog' ,
{
id : 'cookbook-blog' ,
/ * *
* URL route for the blog section of your site .
* * DO NOT * include a trailing slash .
* /
routeBasePath : 'cookbook' ,
/ * *
* Path to data on filesystem relative to site dir .
* /
path : './cookbook' ,
} ,
] ,
2022-04-06 17:15:28 +02:00
] ,
2022-08-14 09:19:24 +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' ) ,
2022-08-14 09:19:24 +02:00
{
hashed : true ,
} ,
] ,
] ,
2021-09-11 17:10:32 +02:00
presets : [
[
'@docusaurus/preset-classic' ,
2023-11-05 13:47:42 +02:00
{
2021-09-11 17:10:32 +02: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-03-19 09:36:20 +02:00
lastVersion : '2.4' ,
2022-09-01 01:52:52 +02:00
versions : {
2023-10-24 14:42:05 +02:00
current : {
2022-09-01 01:52:52 +02:00
label : 'Next' ,
banner : 'unreleased' ,
} ,
2024-03-19 09:36:20 +02:00
'2.4' : {
label : '2.4.x' ,
} ,
2024-01-31 20:47:52 +02:00
'2.3' : {
label : '2.3.x' ,
2024-03-19 09:36:20 +02:00
banner : 'unmaintained' ,
2024-01-31 20:47:52 +02:00
} ,
2024-01-21 13:22:05 +02:00
'2.2' : {
label : '2.2.x' ,
2024-01-31 20:47:52 +02:00
banner : 'unmaintained' ,
2024-01-21 13:22:05 +02:00
} ,
2023-12-27 09:55:22 +02:00
'2.1' : {
label : '2.1.x' ,
2024-01-21 13:22:05 +02:00
banner : 'unmaintained' ,
2023-11-23 18:00:54 +02:00
} ,
2023-12-26 20:49:12 +02:00
'2.0' : {
label : '2.0.x' ,
banner : 'unmaintained' ,
} ,
2023-07-25 12:41:58 +02:00
'1.0' : {
label : '1.0.x' ,
2023-11-14 15:45:44 +02:00
banner : 'unmaintained' ,
2023-07-25 12:41:58 +02:00
} ,
2022-09-01 01:52:52 +02:00
} ,
2021-09-11 17:10:32 +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...' ,
2023-07-11 23:31:45 +02:00
// postsPerPage: 'ALL',
// blogSidebarCount: 0,
} ,
2021-09-11 17:10:32 +02:00
theme : {
customCss : require.resolve ( './src/css/custom.css' ) ,
} ,
2023-11-05 13:47:42 +02:00
} satisfies Preset . Options ,
2021-09-11 17:10:32 +02:00
] ,
2023-06-04 05:07:39 +02:00
[
'redocusaurus' ,
{
// Plugin Options for loading OpenAPI files
specs : [
{
spec : 'swagger.json' ,
route : '/api/' ,
} ,
] ,
// Theme Options for modifying how redoc renders them
theme : {
// Change with your site colors
primaryColor : '#1890ff' ,
} ,
} ,
] ,
2021-09-11 17:10:32 +02:00
] ,
2022-09-25 19:04:47 +02:00
webpack : {
jsLoader : ( isServer ) = > ( {
loader : require.resolve ( 'esbuild-loader' ) ,
options : {
loader : 'tsx' ,
target : isServer ? 'node12' : 'es2017' ,
} ,
} ) ,
} ,
2023-11-05 11:43:44 +02:00
markdown : {
2023-11-05 13:47:42 +02:00
format : 'detect' ,
} ,
2021-09-11 17:10:32 +02:00
} ;
2023-11-05 11:43:44 +02:00
export default config ;