Skip to content

Showing Mermaid Diagram in Wiki doesn't work #7409

Open

Description

@micronet24

Gogs version

0.14.0+dev

Git version

  • Server: 2.30.2
  • Client: N/A

Operating system

Debian 11

Database

MySQL

Describe the bug

Writing Mermaid code to some .md-file in the Repo (eg. README.md) will render the diagram as expected (as implemented in #4229 )

However moving the same file into the Wiki will just display the plain mermaid code instead of the diagram.

To reproduce

Add a Wiki-Page with the following content

graph LR
    A -> B
Loading

Expected behavior

The mermaid graph is rendered in the browser.

Additional context

In templates/base/footer.tmpl the code block importing the mermaid library is guarded by an {{if .IsMarkdown}}. This flag seems not to be set, when viewing Wiki pages.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    💊 bug
    on Mar 24, 2023
  2. unknwon commented on Nov 16, 2026

    @unknwon
    Member

    Fixed in #8620. Mermaid diagrams now render wherever Markdown is shown, including wiki pages, issues, comments and release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    💊 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions