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