docs/docusaurus.config.js
Nick Slowinski 72ebaca826
Alle Prüfungen waren erfolgreich
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
provide search functionality
Signed-off-by: Nick Slowinski <nick@nick-slowinski.de>
2024-01-08 07:48:18 +01:00

138 Zeilen
3,9 KiB
JavaScript

// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
//const lightCodeTheme = require('prism-react-renderer/themes/github');
//const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const {themes} = require('prism-react-renderer');
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Nicks Docs',
tagline: 'Dinosaurs are cool',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://docs.nick-slowinski.de',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'nick-slowinski.de', // Usually your GitHub org/user name.
projectName: 'docs', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'de',
locales: ['de'],
},
// Plugins
plugins: [[ require.resolve('docusaurus-lunr-search'), {
languages: ['en', 'de']
}]],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
showLastUpdateTime: true,
showLastUpdateAuthor: true
},
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
announcementBar: {
id: 'announcementBar-1',
content: 'Diese Dokumentation befindet sich noch im Aufbau und wird nach für nach vervollständigt.',
isCloseable: false,
},
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'Nicks Docs',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
},
footer: {
style: 'dark',
links: [
{
title: 'Rechtliches',
items: [
{
label: 'Impressum',
to: 'https://www.nick-slowinski.de/impressum/',
},
{
label: 'Datenschutzerklärung',
to: 'https://www.nick-slowinski.de/impressum/#datenschutzerkl%C3%A4rung',
},
{
label: 'Haftungsausschluss',
to: 'https://www.nick-slowinski.de/impressum/#haftungsausschluss',
},
],
},
{
title: 'Diverses',
items: [
{
label: 'Status',
to: 'https://status.nick-slowinski.de',
},
{
label: 'Forum',
to: 'https://community.nick-slowinski.de',
},
{
label: 'Fehler melden',
to: 'https://forge.nick-slowinski.de/nick-slowinski.de/docs/issues',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Nick Slowinski und <a href="/mitwirkende">Mitwirkende</a>`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: true,
},
},
}),
};
module.exports = config;