Using click with MermaidJS in markdown causes "This content is blocked. Contact the site owner to fix the issue"
#46096
Replies: 13 comments 8 replies
-
|
Hello @skoblenick thanks for your detailed post, here is the issue the URLs you're trying to link to are being blocked by the Github content security policy. The only workaround is to use an anchor tag within the node label to make it clickable. Unfortunately, it doesn't seem that there's a way to make the entire node element clickable using just the |
Beta Was this translation helpful? Give feedback.
-
|
I'm experiencing this issue too. A "content security policy" that prevents opening links to GitHub itself? Given Mermaid support was announced nearly a year and a half ago then I am really surprised that such a massive gap in functionality is still not fixed. |
Beta Was this translation helpful? Give feedback.
-
|
Come on GitHub, This is a fundamental feature of Mermaid and in my case makes the entire Documentation As Code now very limited. BTW: The fix above by putting the "Anchor" in the "Click Event" is no longer working or at least in my GitHub Organization crismonicwave. Is there an Org Setting to at least allow "Within the same repo" markdown navigation from a Mermaid document Node to a markdown within the repo? This example below does NOT work. Main github pages for CrismonicWaveflowchart TB
user --> dashboard
click dashboard "./SECURITY.md" _parent
I get the message shown in the attached screen shot. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for posting this. This is obviously needed. Maybe the answer is called "GitLab" ? |
Beta Was this translation helpful? Give feedback.
-
|
I am experiencing a similar issue. I am documenting an infrastructure architecture with MermaidJS flowchart abilities and each node represents a GitHub repository and I want to link them as such (so far all internal GH links, that is). Commenting here to address 1) that more people are affected, and 2) subscribing myself to updates. Example console error
Example Mermaid graph---
title: Infrastructure architecture
---
flowchart LR
subgraph design
repo1 --> repo2
end
click repo1 href "https://github.com/org/repo1" _blank
click repo2 href "https://github.com/org/repo2" _blank
|
Beta Was this translation helpful? Give feedback.
-
|
Adding a +1 here for this issue. Mermaid support is great, but not having hyperlinks is very limiting. I should add that I just want to be able to link to an anchor in the same markdown document. |
Beta Was this translation helpful? Give feedback.
-
|
I also require this. Posting to subscribe to updates... |
Beta Was this translation helpful? Give feedback.
-
|
It seems that even |
Beta Was this translation helpful? Give feedback.
-
|
Please Github, enable click interaction on mermaidJS. At this time, anchor on label is the only way to make it works |
Beta Was this translation helpful? Give feedback.
-
|
This would be super helpful! |
Beta Was this translation helpful? Give feedback.
-
|
Does the mindmap support the link or href? |
Beta Was this translation helpful? Give feedback.
-
|
For those still watching this, The biggest thing for me is that relative links do not work still as they are relative to flowchart LR
Google --- GitHub
click Google href "https://www.google.com"
click GitHub href "https://www.github.com"
gantt
dateFormat YYYY-MM-DD
section Clickable
Google :g1, 2014-01-07, 3d
GitHub :g2, after g1, 3d
click g1 href "https://www.google.com"
click g2 href "https://www.github.com"
classDiagram
class Google
class GitHub
Google --> GitHub
click Google href "src"
click GitHub href "https://www.github.com"
|
Beta Was this translation helpful? Give feedback.
-
|
still a problem for me as well - would be nice to have tbh |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
I have started adding diagrams (using mermaid) within markdown files in my repo. I was expecting to be able to leverage the interactive functionality as described here. However, if I provide a full URL and click the elements it goes to a
This content is blocked. Contact the site owner to fix the issue.Example that produces the above:
If, I click node it produces the issues above, but I right-click and open in new window/tab it loads the expected page without 404ing.
I have also tried using a relative path on the URL, but that 404s due to the diagram being served in an iframe with a different URL (https://viewscreen.githubusercontent.com/markdown/dashboard/README.md)
The only method I've found that works as expected is by putting an anchor in the node's label like:
While it works... It has the undesired effect of only the label being clickable and not the entire node element.
Is there a method to make this work correctly strictly using
click?Beta Was this translation helpful? Give feedback.
All reactions