1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00
woodpecker/docs/docusaurus.config.js

183 lines
4.7 KiB
JavaScript
Raw Normal View History

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const path = require('path');
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'Woodpecker CI',
tagline: 'Woodpecker is a simple CI engine with great extensibility.',
url: 'https://woodpecker-ci.org',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
onDuplicateRoutes: 'throw',
organizationName: 'woodpecker-ci',
projectName: 'woodpecker-ci.github.io',
trailingSlash: false,
themeConfig: {
navbar: {
title: 'Woodpecker',
logo: {
alt: 'Woodpecker Logo',
src: 'img/logo.svg',
srcDark: 'img/logo-darkmode.svg',
},
items: [
{
2021-12-18 02:05:23 +02:00
to: 'docs/intro',
2022-02-04 11:53:03 +02:00
activeBaseRegex: 'docs/(?!migrations|awesome)',
position: 'left',
label: 'Docs',
},
{
to: '/plugins',
position: 'left',
label: 'Plugins',
},
{
to: '/docs/migrations',
2021-12-18 02:05:23 +02:00
activeBaseRegex: 'docs/migrations',
position: 'left',
label: 'Migrations',
},
{
to: '/faq',
position: 'left',
label: 'FAQ',
},
2022-02-04 11:53:03 +02:00
{
to: '/docs/awesome',
2022-02-04 11:53:03 +02:00
position: 'left',
label: 'Awesome',
},
{
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: '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',
href: 'https://mastodon.technology/@WoodpeckerCI',
},
],
},
{
title: 'More',
items: [
{
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: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
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)',
},
2021-10-16 21:05:13 +02:00
algolia: {
appId: 'BH4D9OD16A',
apiKey: '148f85e216b68d20ffa49d46a2b89d0e',
indexName: 'woodpecker-ci',
2021-10-16 21:05:13 +02:00
debug: false, // Set debug to true if you want to inspect the modal
},
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 4,
},
},
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',
},
},
],
};
},
}),
],
themes: [path.resolve(__dirname, 'plugins', 'woodpecker-plugins', 'dist')],
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/woodpecker-ci/woodpecker/edit/master/docs/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
};