mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-02 10:35:08 -05:00
docs: switch to native mermaid support (#2306)
This commit is contained in:
parent
6e5ba774d8
commit
c7996481f2
@ -6,8 +6,6 @@ const darkCodeTheme = require('prism-react-renderer').themes.dracula;
|
|||||||
|
|
||||||
/** @type {import('@docusaurus/types').Config} */
|
/** @type {import('@docusaurus/types').Config} */
|
||||||
async function createConfig() {
|
async function createConfig() {
|
||||||
const mdxMermaid = await import('mdx-mermaid')
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: 'Constellation',
|
title: 'Constellation',
|
||||||
tagline: 'Constellation: The world\'s most secure Kubernetes',
|
tagline: 'Constellation: The world\'s most secure Kubernetes',
|
||||||
@ -37,38 +35,18 @@ async function createConfig() {
|
|||||||
locales: ['en'],
|
locales: ['en'],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// mermaid
|
||||||
|
markdown: {
|
||||||
|
mermaid: true,
|
||||||
|
},
|
||||||
|
themes: ['@docusaurus/theme-mermaid'],
|
||||||
|
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
'classic',
|
'classic',
|
||||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||||
({
|
({
|
||||||
docs: {
|
docs: {
|
||||||
remarkPlugins: [[mdxMermaid.default, {
|
|
||||||
mermaid: {
|
|
||||||
theme: 'base',
|
|
||||||
themeVariables: {
|
|
||||||
// general
|
|
||||||
'fontFamily': '"Open Sans", sans-serif',
|
|
||||||
'primaryColor': '#90FF99', // edgeless green
|
|
||||||
'primaryTextColor': '#000000',
|
|
||||||
'secondaryColor': '#A5A5A5', // edgeless grey
|
|
||||||
'secondaryTextColor': '#000000',
|
|
||||||
'tertiaryColor': '#E7E6E6', // edgeless light grey
|
|
||||||
'tertiaryTextColor': '#000000',
|
|
||||||
// flowchart
|
|
||||||
'clusterBorder': '#A5A5A5',
|
|
||||||
'clusterBkg': '#ffffff',
|
|
||||||
'edgeLabelBackground': '#ffffff',
|
|
||||||
// sequence diagram
|
|
||||||
'activationBorderColor': '#000000',
|
|
||||||
'actorBorder': '#A5A5A5',
|
|
||||||
'actorFontFamily': '"Open Sans", sans-serif', // not released by mermaid yet
|
|
||||||
'noteBkgColor': '#8B04DD', // edgeless purple
|
|
||||||
'noteTextColor': '#ffffff',
|
|
||||||
},
|
|
||||||
startOnLoad: true
|
|
||||||
}
|
|
||||||
}]],
|
|
||||||
sidebarPath: require.resolve('./sidebars.js'),
|
sidebarPath: require.resolve('./sidebars.js'),
|
||||||
// sidebarPath: 'sidebars.js',
|
// sidebarPath: 'sidebars.js',
|
||||||
// Please change this to your repo.
|
// Please change this to your repo.
|
||||||
@ -216,6 +194,32 @@ async function createConfig() {
|
|||||||
darkTheme: darkCodeTheme,
|
darkTheme: darkCodeTheme,
|
||||||
additionalLanguages: ['shell-session'],
|
additionalLanguages: ['shell-session'],
|
||||||
},
|
},
|
||||||
|
mermaid: {
|
||||||
|
theme: { light: 'base', dark: 'base' },
|
||||||
|
options: {
|
||||||
|
themeVariables: {
|
||||||
|
// general
|
||||||
|
fontFamily: '"Open Sans", sans-serif',
|
||||||
|
primaryColor: '#90FF99', // edgeless green
|
||||||
|
primaryTextColor: '#000000',
|
||||||
|
secondaryColor: '#A5A5A5', // edgeless grey
|
||||||
|
secondaryTextColor: '#000000',
|
||||||
|
tertiaryColor: '#E7E6E6', // edgeless light grey
|
||||||
|
tertiaryTextColor: '#000000',
|
||||||
|
// flowchart
|
||||||
|
clusterBorder: '#A5A5A5',
|
||||||
|
clusterBkg: '#ffffff',
|
||||||
|
edgeLabelBackground: '#ffffff',
|
||||||
|
// sequence diagram
|
||||||
|
activationBorderColor: '#000000',
|
||||||
|
actorBorder: '#A5A5A5',
|
||||||
|
actorFontFamily: '"Open Sans", sans-serif', // not released by mermaid yet
|
||||||
|
noteBkgColor: '#8B04DD', // edgeless purple
|
||||||
|
noteTextColor: '#ffffff',
|
||||||
|
},
|
||||||
|
startOnLoad: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -14,17 +14,16 @@
|
|||||||
"write-heading-ids": "docusaurus write-heading-ids"
|
"write-heading-ids": "docusaurus write-heading-ids"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cmfcmf/docusaurus-search-local": "^1.0.0",
|
"@cmfcmf/docusaurus-search-local": "^1.1.0",
|
||||||
"@docusaurus/core": "^2.2.0",
|
"@docusaurus/core": "^2.2.0",
|
||||||
"@docusaurus/module-type-aliases": "^2.2.0",
|
"@docusaurus/module-type-aliases": "^2.2.0",
|
||||||
"@docusaurus/plugin-google-gtag": "^2.4.1",
|
"@docusaurus/plugin-google-gtag": "^2.4.1",
|
||||||
"@docusaurus/preset-classic": "^2.2.0",
|
"@docusaurus/preset-classic": "^2.4.1",
|
||||||
|
"@docusaurus/theme-mermaid": "^2.4.1",
|
||||||
"@mdx-js/react": "^1.6.22",
|
"@mdx-js/react": "^1.6.22",
|
||||||
"asciinema-player": "^3.0.1",
|
"asciinema-player": "^3.5.0",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"mdx-mermaid": "^1.3.2",
|
"prism-react-renderer": "^2.0.6",
|
||||||
"mermaid": "^10.0.0",
|
|
||||||
"prism-react-renderer": "^2.0.0",
|
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2"
|
"react-dom": "^17.0.2"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user