Skip to content
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

Mermaid graphs missing node labels #10538

Closed
6 of 7 tasks
ei-grad opened this issue Sep 30, 2024 · 1 comment
Closed
6 of 7 tasks

Mermaid graphs missing node labels #10538

ei-grad opened this issue Sep 30, 2024 · 1 comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution closed: duplicate This issue or pull request already exists in another issue or pull request

Comments

@ei-grad
Copy link

ei-grad commented Sep 30, 2024

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Following the official Docusaurus documentation for integrating Mermaid graphs, I'm experiencing an issue where the node labels in embedded Mermaid graphs within blog posts do not display. The nodes appear as empty blocks without any text labels. Reproduced this behavior with site built in docker to isolate possible problems with my environment. Checked in latest Firefox and Chromium browsers.

Reproducible demo

new.docusaurus.io doesn't allow to add modules

Steps to reproduce

  1. Initialize a new Docusaurus site:

    npx create-docusaurus@latest my-website classic
    cd my-website
  2. Install the Mermaid theme:

    npm install @docusaurus/theme-mermaid
  3. Update docusaurus.config.js (or docusaurus.config.ts):

    Add the following lines to enable the Mermaid theme and plugin:

    themes: ['@docusaurus/theme-mermaid'],
    markdown: {
      mermaid: true,
    },
  4. Add a Mermaid graph to the first blog post:

    Append the graph to blog/2019-05-28-first-blog-post.md:

    cat >> blog/2019-05-28-first-blog-post.md << "EOF"
    ```mermaid
    graph TD;
      A-->B;
      A-->C;
      B-->D;
      C-->D;
    ```
    EOF
  5. Start the development server:

    npm start
  6. Navigate to the first blog post:

    Open http://localhost:3000/blog/first-blog-post in your browser.

Expected behavior

The Mermaid graph should display correctly with all node labels (A, B, C, D) visible.

Actual behavior

The graph is rendered, but the node labels are missing. Nodes appear as empty blocks without any text.

Your environment

    "@docusaurus/core": "3.5.2",
    "@docusaurus/preset-classic": "3.5.2",
    "@docusaurus/theme-mermaid": "^3.5.2",
    "@mdx-js/react": "^3.0.0",
    "clsx": "^2.0.0",
    "prism-react-renderer": "^2.3.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0"

Self-service

  • I'd be willing to fix this bug myself.
@ei-grad ei-grad added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Sep 30, 2024
@slorber
Copy link
Collaborator

slorber commented Sep 30, 2024

Duplicate of #10526

@slorber slorber marked this as a duplicate of #10526 Sep 30, 2024
@slorber slorber closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
@slorber slorber added closed: duplicate This issue or pull request already exists in another issue or pull request and removed status: needs triage This issue has not been triaged by maintainers labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution closed: duplicate This issue or pull request already exists in another issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants