Fix Docusaurus config

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2023-11-30 00:28:35 +01:00
parent 893628a157
commit ebfd59f25b
3 changed files with 457 additions and 325 deletions
+22 -36
View File
@@ -1,15 +1,11 @@
// SPDX-FileCopyrightText: 2023 Steffen Vogel <post@steffenvogel.de>
// SPDX-License-Identifier: Apache-2.0
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
import {themes as prismThemes} from 'prism-react-renderer';
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
const prism = require("prism-react-renderer");
const math = require("remark-math");
const katex = require("rehype-katex");
/** @type {import("@docusaurus/types").Config} */
module.exports = {
export default {
title: "cunīcu",
tagline: "zeroconf • p2p • mesh • vpn",
url: "https://cunicu.li",
@@ -30,10 +26,7 @@ module.exports = {
],
plugins: [
[
require.resolve("@cmfcmf/docusaurus-search-local"),
{ }
],
require.resolve('docusaurus-lunr-search'),
[
require.resolve("@gabrielcsapo/docusaurus-plugin-matomo"),
{
@@ -57,7 +50,7 @@ module.exports = {
],
// GitHub pages deployment config.
// If you aren"t using GitHub pages, you don't need these.
// If you aren't using GitHub pages, you don't need these.
organizationName: "cunicu", // Usually your GitHub org/user name.
projectName: "cunicu", // Usually your repo name.
@@ -90,18 +83,17 @@ module.exports = {
},
],
[
"classic",
/** @type {import("@docusaurus/preset-classic").Options} */
"@docusaurus/preset-classic",
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl:
"https://github.com/cunicu/cunicu/edit/main/",
remarkPlugins: [
math
remarkMath
],
rehypePlugins: [
katex
rehypeKatex
],
},
blog: {
@@ -119,10 +111,12 @@ module.exports = {
],
themeConfig:
/** @type {import("@docusaurus/preset-classic").ThemeConfig} */
({
{
mermaid: {
theme: {light: 'neutral', dark: 'forest'},
theme: {
light: 'neutral',
dark: 'forest'
},
},
colorMode: {
disableSwitch: true
@@ -200,9 +194,10 @@ module.exports = {
],
copyright: `Copyright © ${new Date().getFullYear()} Steffen Vogel.`,
},
prism: {
theme: prism.themes.github,
darkTheme: prism.themes.dracula,
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
metadata: [
@@ -219,19 +214,10 @@ module.exports = {
content: "@stv0g"
}
]
}),
},
markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],
headTags: [
{
tagName: "meta",
attributes: {
}
}
],
themes: ["@docusaurus/theme-mermaid"],
markdown: {
mermaid: true,
},
};
+6 -6
View File
@@ -14,20 +14,20 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "^1.0.0",
"@docusaurus/core": "3.0.0",
"@docusaurus/preset-classic": "3.0.0",
"@docusaurus/theme-mermaid": "^3.0.0",
"@docusaurus/theme-mermaid": "3.0.0",
"@gabrielcsapo/docusaurus-plugin-matomo": "^0.1.2",
"@mdx-js/react": "^1.6.22",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.2.1",
"docusaurus-lunr-search": "^3.3.0",
"hast-util-is-element": "1.1.0",
"prism-react-renderer": "^2.1.0",
"raw-loader": "^4.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redocusaurus": "^1.6.3",
"rehype-katex": "5",
"redocusaurus": "^2.0.0",
"rehype-katex": "7",
"remark-math": "6",
"unist-util-visit": "^4.1.2"
},
@@ -47,7 +47,7 @@
]
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
},
"packageManager": "yarn@3.6.1"
}
+429 -283
View File
File diff suppressed because it is too large Load Diff