2023-09-11 08:52:23 +02:00
const codeThemes = require ( 'prism-react-renderer' ) . themes ;
2021-10-16 21:27:51 +02:00
const path = require ( 'path' ) ;
2021-09-11 17:10:32 +02:00
2022-10-08 10:53:42 +02:00
/** @type {import('@docusaurus/types').Config} */
2021-09-11 17:10:32 +02:00
module . exports = {
title : 'Woodpecker CI' ,
tagline : 'Woodpecker is a simple CI 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 ,
2022-10-08 10:53:42 +02:00
themeConfig :
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
( {
navbar : {
title : 'Woodpecker' ,
logo : {
alt : 'Woodpecker Logo' ,
src : 'img/logo.svg' ,
2021-09-11 17:10:32 +02:00
} ,
2022-10-08 10:53:42 +02:00
items : [
{
2022-11-19 16:21:03 +02:00
type : 'doc' ,
2023-02-28 18:30:25 +02:00
docId : 'intro' ,
2022-10-08 10:53:42 +02:00
activeBaseRegex : 'docs/(?!migrations|awesome)' ,
position : 'left' ,
label : 'Docs' ,
} ,
{
to : '/plugins' ,
position : 'left' ,
label : 'Plugins' ,
} ,
{
2022-11-19 16:21:03 +02:00
to : '/docs/next/migrations' , // Always point to newest migration guide
activeBaseRegex : 'docs/(next/)?migrations' ,
2022-10-08 10:53:42 +02:00
position : 'left' ,
label : 'Migrations' ,
} ,
{
to : '/faq' ,
position : 'left' ,
label : 'FAQ' ,
} ,
{
2022-11-19 16:21:03 +02:00
to : '/docs/next/awesome' , // Always point to newest awesome list
activeBaseRegex : 'docs/(next/)?awesome' ,
2022-10-08 10:53:42 +02:00
position : 'left' ,
label : 'Awesome' ,
} ,
2023-06-04 05:07:39 +02:00
{
to : '/api' ,
position : 'left' ,
label : 'API' ,
} ,
2023-07-11 23:31:45 +02:00
{ to : 'blog' , label : 'Blog' , position : 'left' } ,
2022-10-08 10:53: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 : [
2023-02-28 18:30:25 +02:00
{
label : 'Introduction' ,
to : '/docs/intro' ,
} ,
2022-10-08 10:53:42 +02:00
{
label : 'Usage' ,
to : '/docs/usage/intro' ,
} ,
{
label : 'Server setup' ,
to : '/docs/administration/setup' ,
} ,
{
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' ,
2022-10-29 13:07:35 +02:00
href : 'https://floss.social/@WoodpeckerCI' ,
2022-10-08 10:53: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' ,
} ,
{
href : 'https://ci.woodpecker-ci.org/woodpecker-ci/woodpecker' ,
label : 'CI' ,
} ,
] ,
} ,
] ,
copyright : ` Copyright © ${ new Date ( ) . getFullYear ( ) } Woodpecker CI. Built with Docusaurus. ` ,
} ,
prism : {
2023-09-11 08:52:23 +02:00
theme : codeThemes . github ,
darkTheme : codeThemes . dracula ,
2022-10-08 10:53: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 ,
} ,
} ) ,
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' ,
} ,
} ,
} ;
} ,
} ) ,
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' ,
2022-10-08 10:53:42 +02:00
/** @type {import('@docusaurus/preset-classic').Options} */
( {
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 ,
2023-07-26 20:06:43 +02:00
lastVersion : '1.0' ,
2022-09-01 01:52:52 +02:00
versions : {
2023-07-25 12:41:58 +02:00
'current' : {
2022-09-01 01:52:52 +02:00
label : 'Next' ,
banner : 'unreleased' ,
} ,
2023-07-25 12:41:58 +02:00
'1.0' : {
label : '1.0.x' ,
} ,
'0.15' : {
2022-09-01 01:52:52 +02:00
label : '0.15.x' ,
2023-07-26 20:06:43 +02:00
banner : 'unmaintained' ,
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' ) ,
} ,
2022-10-08 10:53:42 +02:00
} ) ,
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' ,
} ,
} ) ,
} ,
2021-09-11 17:10:32 +02:00
} ;