Have you read the Contributing Guidelines on issues?
Description
One of the most frustrating parts in the docs is when you install and get Docusaurus running, but cannot find how to properly configure 2 or more themes. The examples always use module.exports = { } but yet the default shipping config of Docusaurus uses an object with simply config. So when someone wants to simply add let's say Mermaid theme for their markdown pages, it's super confusing how to simply add Mermaid as a theme into the docs, or blog sections.
I would love to improve the docs, but need the answer before I can contribute.
I wanted to do something as easy as this:
module.exports = {
config,
themes: ['@docusaurus/theme-mermaid'],
}
but of course that syntax isn't respected.
I did add the other config parts into the preset-classic ThemeConfig section
// MERMAID CONFIG //
markdown: {
mermaid: true,
},
mermaid: {
options: {
maxTextSize: 50,
}
}
// END OF MERMAID CONFIG //
but of course the pages do not show mermaid styling, but only the raw codeblock text of the mermaid graph.
I suspected I needed the mermaid theme still to be added, but on the preset-classic, not sure where or how.
In general, how to use the default installation to add or use 2 themes. Because module.exports = config is not easily understood other than it's a Config type.
Self-service
Have you read the Contributing Guidelines on issues?
Description
One of the most frustrating parts in the docs is when you install and get Docusaurus running, but cannot find how to properly configure 2 or more themes. The examples always use
module.exports = { }but yet the default shipping config of Docusaurus uses an object with simplyconfig. So when someone wants to simply add let's say Mermaid theme for their markdown pages, it's super confusing how to simply add Mermaid as a theme into the docs, or blog sections.I would love to improve the docs, but need the answer before I can contribute.
I wanted to do something as easy as this:
but of course that syntax isn't respected.
I did add the other config parts into the preset-classic ThemeConfig section
but of course the pages do not show mermaid styling, but only the raw codeblock text of the mermaid graph.
I suspected I needed the mermaid theme still to be added, but on the preset-classic, not sure where or how.
In general, how to use the default installation to add or use 2 themes. Because
module.exports = configis not easily understood other than it's a Config type.Self-service