You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "Swadeep006 (via GitHub)" <gi...@apache.org> on 2025/12/10 09:45:02 UTC
[PR] fix #408 [incubator-hugegraph-doc]
Swadeep006 opened a new pull request, #437:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/437
## Purpose of the PR
- close #408
Replaced the external Mermaid CDN script with a locally hosted `mermaid.min.js` to make Mermaid rendering compliant with ASF CSP rules.
### Summary
- Added `mermaid.min.js` under `static/js/`
- Updated `head-end.html` to load Mermaid from `'self'` instead of an external CDN
- Verified that Mermaid diagrams render correctly and no external scripts are loaded
<img width="1917" height="1023" alt="Screenshot 2025-12-10 151228" src="https://github.com/user-attachments/assets/c7a96be5-0186-433a-acbe-f61b5aa64a4c" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] fix #408 [incubator-hugegraph-doc]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #437:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/437#discussion_r2606114897
##########
themes/docsy/layouts/partials/hooks/head-end.html:
##########
@@ -3,7 +3,7 @@
{{ end }}
{{ if .Site.Params.mermaid.enable }}
-<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
+<script src="{{ "js/mermaid.min.js" | relURL }}"></script>
Review Comment:
This change introduces duplicate loading of `mermaid.min.js`. The Mermaid library is already loaded in `themes/docsy/layouts/partials/scripts.html` at line 6. Loading the same library twice will cause unnecessary bandwidth usage and may lead to initialization conflicts.
Consider removing this script tag since Mermaid is already loaded in `scripts.html`, or remove the one in `scripts.html` if this location is preferred.
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] fix #408 [incubator-hugegraph-doc]
Posted by "Swadeep006 (via GitHub)" <gi...@apache.org>.
Swadeep006 commented on code in PR #437:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/437#discussion_r2606229831
##########
themes/docsy/layouts/partials/hooks/head-end.html:
##########
@@ -3,7 +3,7 @@
{{ end }}
{{ if .Site.Params.mermaid.enable }}
-<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
+<script src="{{ "js/mermaid.min.js" | relURL }}"></script>
Review Comment:
hi @imbajin ,
Updated head-end.html to only handle Mermaid initialization. The library itself is now loaded once from scripts.html via the local js/mermaid.min.js file to avoid duplicate script loading.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] fix: make mermaid.js store locally & remove duplicated import [incubator-hugegraph-doc]
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin merged PR #437:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/437
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org