woodpecker/docs/docusaurus.config.js
Anbraten ed03a318c5
Improve docs (#450)
- update docusaurus
- add typescript
- add prettier
- add open-collective & sponsor us links
- add announcement bar (star on github)
- add mastodon (footer)
- collapse admin area in sidebar by default
- move faq doc to pages
2021-10-16 21:27:51 +02:00

138 lines
3.6 KiB
JavaScript

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',
favicon: 'img/favicon.ico',
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: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Docs',
},
{
type: 'doc',
docId: 'migrations',
position: 'left',
label: 'Migrations',
},
{
to: '/faq',
position: 'left',
label: 'FAQ',
},
{
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: 'Mastodon',
href: 'https://mastodon.technology/@WoodpeckerCI',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/woodpecker-ci/woodpecker',
},
{
href: 'https://wp.laszlo.cloud/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)',
},
algolia: {
appId: 'BH4D9OD16A',
apiKey: '148f85e216b68d20ffa49d46a2b89d0e',
indexName: 'woodpecker-ci',
debug: false, // Set debug to true if you want to inspect the modal
},
},
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'),
},
},
],
],
};