-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docusaurus 2.1.0 has another config. #68
Comments
@DraTeots At first, you should write this to the top of the config file. And then, just add below presets to docs,
I hope it works for you, too! |
I'm on v2.1.0 and getting the same error when I this code
throws this error:
trying instead
compiles and shows the diagram as given in the tutorial so @chungkwonryu, is there anything else you modified to make the following code work?
|
I use :
And solution given by @chungkwonryu works for me 😃 (#68 (comment)) Thanks !!! |
means you an on docusaurus/core v2.1? |
Hello, Yesterday I tried a brand new installation of Docusaurus 2.1 along with the current mdx-mermaid plugin. First, I get the following typescript error, If I try the proposed solution:
Can you figure out the reason? |
@PackElend I followed the initial recommendation #68 (comment) |
I also switched to the code proposed on the README.md file of this repo (with the |
Seems that a restart of nodeJS made it work, with Docusaurus 2.1 and the code in the README.md. The typescript error is still there though. |
I got it working in 2.1 doing
see #68 (comment) but that is not how it is recommended here, that concerns me a bit. |
Nice to see it works for you now I'm on Docusaurus/core 2.0.0 with a custom config because I use this plugin to generate my site. So my working config ( // @ts-check
[...]
const mdxMermaid = require('mdx-mermaid')
/** @type {import('@docusaurus/types').Config} */
const config = {
[...]
presets: [
[
"docusaurus-preset-openapi",
/** @type {import('docusaurus-preset-openapi').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl: "MyRepoEditUrl",
remarkPlugins: [mdxMermaid],
},
}),
],
],
[...]
};
module.exports = config; |
FYI official Docusaurus support is coming with facebook/docusaurus#7490 |
Describe the bug
Running
npx create-docusaurus@latest test-code classic --typescript # or npx create-docusaurus@latest test-code classic
Creates a website, that has another config strcture, than in examples. While look similar, seems there is no "remarkPlugins" in JS definition. As there is no createConfig() and other changes.
Experiments with importing mdxMermaid and adding to remarkPlugins got errors like:
config
errors:
I also tried to npm instlal mdx-markdown@^2.0.0. but it was not found in npm.
related to #64
The text was updated successfully, but these errors were encountered: