You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by hc...@apache.org on 2026/03/16 16:43:57 UTC

(mahout) branch main updated: docs: self host katex.min.css to fix not loading issue (#1140)

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

hcr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/mahout.git


The following commit(s) were added to refs/heads/main by this push:
     new 4ab3619cf docs: self host katex.min.css to fix not loading issue (#1140)
4ab3619cf is described below

commit 4ab3619cfd7baf2a13fc0a1b1bf4fbabce66be75
Author: Tim Hsiung <be...@gmail.com>
AuthorDate: Tue Mar 17 00:43:50 2026 +0800

    docs: self host katex.min.css to fix not loading issue (#1140)
---
 LICENSE                          | 8 ++++++++
 website/docusaurus.config.ts     | 4 +---
 website/src/css/custom.css       | 1 +
 website/static/css/katex.min.css | 1 +
 4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/LICENSE b/LICENSE
index 06162da55..eed70f991 100644
--- a/LICENSE
+++ b/LICENSE
@@ -232,3 +232,11 @@ Proper
 Files in the directory: website/assets/vendor/propper
 Are copied from the Propper project (https://popper.js.org/)
 which is licensed under the MIT license.
+
+================================================================
+KaTeX
+================================================================
+
+Files in the directory: website/static/css/katex.min.css
+Are copied from the KaTeX project (https://katex.org/)
+which is licensed under the MIT license.
diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts
index 9b99492e2..9a296b39b 100644
--- a/website/docusaurus.config.ts
+++ b/website/docusaurus.config.ts
@@ -89,10 +89,8 @@ const config: Config = {
   // KaTeX stylesheet for math rendering
   stylesheets: [
     {
-      href: 'https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css',
+      href: '/css/katex.min.css',
       type: 'text/css',
-      integrity: 'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
-      crossorigin: 'anonymous',
     },
   ],
 
diff --git a/website/src/css/custom.css b/website/src/css/custom.css
index e171b431b..f098699ea 100644
--- a/website/src/css/custom.css
+++ b/website/src/css/custom.css
@@ -43,6 +43,7 @@
 }
 
 /* Import Google Fonts */
+/* TODO: the fonts are not loading on prod site, we need to fix this */
 @import url('https://fonts.googleapis.com/css2?family=Maven+Pro:wght@400;500;600;700&family=Muli:wght@400;600;700&display=swap');
 
 /* GitHub icon in navbar */
diff --git a/website/static/css/katex.min.css b/website/static/css/katex.min.css
new file mode 100644
index 000000000..2d5536bac
--- /dev/null
+++ b/website/static/css/katex.min.css
@@ -0,0 +1 @@
+@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) form [...]