This is an automated email from the ASF dual-hosted git repository.

jin pushed a commit to branch local-static
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-doc.git

commit 052d37f387b09e6c93293b1cd55c9fabe01dda75
Author: imbajin <[email protected]>
AuthorDate: Mon Feb 17 15:06:45 2025 +0800

    refactor: use local static files for ASF CSP rule
    
    TODO:
    1. find jquery
    2. google fonts (if we need)
---
 themes/docsy/layouts/partials/scripts.html | 13 +++++--------
 themes/docsy/static/js/bootstrap.min.js    |  7 +++++++
 themes/docsy/static/js/jquery.min.js       |  2 ++
 themes/docsy/static/js/mermaid.min.js      |  3 +++
 themes/docsy/static/js/popper.min.js       |  5 +++++
 5 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/themes/docsy/layouts/partials/scripts.html 
b/themes/docsy/layouts/partials/scripts.html
index 0e3177eb..0d8f874c 100644
--- a/themes/docsy/layouts/partials/scripts.html
+++ b/themes/docsy/layouts/partials/scripts.html
@@ -1,12 +1,9 @@
-<script 
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js";
-    
integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
-    crossorigin="anonymous"></script>
-<script 
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js";
-    
integrity="sha512-UR25UO94eTnCVwjbXozyeVd6ZqpaAE9naiEUBK/A+QDbfSTQFhPGj5lOR6d8tsgbBk84Ggb5A3EkjsOgPRPcKA=="
-    crossorigin="anonymous"></script>
+<script src="/js/popper.min.js" | relURL ></script>
+<script src="/js/bootstrap.min.js" | relURL ></script>
+
 
 {{ if .Site.Params.mermaid.enable }}
-<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js"; 
integrity="sha512-JERecFUBbsm75UpkVheAuDOE8NdHjQBrPACfEQYPwvPG+fjgCpHAz1Jw2ci9EXmd3DdfiWth3O3CQvcfEg8gsA=="
 crossorigin="anonymous"></script>
+<script src="/js/mermaid.min.js" | relURL ></script>
 {{ end }}
 
 {{ if .Site.Params.markmap.enable }}
@@ -48,7 +45,7 @@ window.markmap = {
 {{ end }}
 <!-- To automatically render math in text elements, include the auto-render 
extension: -->
 <script defer 
src='https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js'
-    
integrity='sha512-ZA/RPrAo88DlwRnnoNVqKINnQNcWERzRK03PDaA4GIJiVZvGFIWQbdWCsUebMZfkWohnfngsDjXzU6PokO4jGw=='
 crossorigin='anonymous' 
+    
integrity='sha512-ZA/RPrAo88DlwRnnoNVqKINnQNcWERzRK03PDaA4GIJiVZvGFIWQbdWCsUebMZfkWohnfngsDjXzU6PokO4jGw=='
 crossorigin='anonymous'
     {{ printf "onload='renderMathInElement(%s, %s);'" (( 
.Site.Params.katex.html_dom_element | default "document.body" ) | safeJS ) ( 
printf "%s" ( $.Site.Params.katex.options | jsonify )) | safeHTMLAttr 
}}></script>
 {{ end }}
 
diff --git a/themes/docsy/static/js/bootstrap.min.js 
b/themes/docsy/static/js/bootstrap.min.js
new file mode 100644
index 00000000..50720ead
--- /dev/null
+++ b/themes/docsy/static/js/bootstrap.min.js
@@ -0,0 +1,7 @@
+/*!
+  * Bootstrap v4.6.1 (https://getbootstrap.com/)
+  * Copyright 2011-2021 The Bootstrap Authors 
(https://github.com/twbs/bootstrap/graphs/contributors)
+  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+  */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof 
module?e(exports,require("jquery"),require("popper.js")):"function"==typeof 
define&&define.amd?define(["exports","jquery","popper.js"],e):e((t="undefined"!=typeof
 
globalThis?globalThis:t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use
 strict";function i(t){return t&&"object"==typeof t&&"default"in 
t?t:{default:t}}var o=i(e),a=i(n);function s(t,e){for(var 
n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerabl [...]
+//# sourceMappingURL=bootstrap.min.js.map
\ No newline at end of file
diff --git a/themes/docsy/static/js/jquery.min.js 
b/themes/docsy/static/js/jquery.min.js
new file mode 100644
index 00000000..b0614034
--- /dev/null
+++ b/themes/docsy/static/js/jquery.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | 
jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof 
module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw
 new Error("jQuery requires a window with a document");return 
t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use 
strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return 
t.flat.call(e)}:function(e){return 
t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=
 [...]
diff --git a/themes/docsy/static/js/mermaid.min.js 
b/themes/docsy/static/js/mermaid.min.js
new file mode 100644
index 00000000..7ea93c7c
--- /dev/null
+++ b/themes/docsy/static/js/mermaid.min.js
@@ -0,0 +1,3 @@
+/*! For license information please see mermaid.min.js.LICENSE.txt */
+!function(t,e){"object"==typeof exports&&"object"==typeof 
module?module.exports=e():"function"==typeof 
define&&define.amd?define([],e):"object"==typeof 
exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof 
self?self:this,(function(){return(()=>{var t={5051:(t,e,n)=>{t=n.nmd(t);var 
r=function(){var 
t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return 
n},e=[1,6],n=[1,7],r=[1,8],i=[1,9],a=[1,12],o=[1,11],s=[1,15,24],c=[1,19],u=[1,31],l=[1,34],h=[1,32],f=[1,33],d=[1,35],
 [...]
+//# sourceMappingURL=mermaid.min.js.map
\ No newline at end of file
diff --git a/themes/docsy/static/js/popper.min.js 
b/themes/docsy/static/js/popper.min.js
new file mode 100644
index 00000000..bb1aaae3
--- /dev/null
+++ b/themes/docsy/static/js/popper.min.js
@@ -0,0 +1,5 @@
+/*
+ Copyright (C) Federico Zivolo 2020
+ Distributed under the MIT License (license terms are at 
http://opensource.org/licenses/MIT).
+ */(function(e,t){'object'==typeof exports&&'undefined'!=typeof 
module?module.exports=t():'function'==typeof 
define&&define.amd?define(t):e.Popper=t()})(this,function(){'use 
strict';function e(e){return e&&'[object 
Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var 
o=e.ownerDocument.defaultView,n=o.getComputedStyle(e,null);return 
t?n[t]:n}function 
o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function 
n(e){if(!e)return document.body;switch(e.nodeName) [...]
+//# sourceMappingURL=popper.min.js.map

Reply via email to