Skip to content

Commit 4e8a523

Browse files
authored
content: Update KaTeX link attributes to v0.16.25 (phase 2)
Affects: - content/en/content-management/mathematics.md - content/en/functions/transform/ToMath.md - content/en/render-hooks/passthrough.md - layouts/baseof.html
1 parent 21046b9 commit 4e8a523

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

‎content/en/content-management/mathematics.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords: []
1010

1111
Mathematical equations and expressions written in [LaTeX][] are common in academic and scientific publications. Your browser typically renders this mathematical markup using an open-source JavaScript display engine such as [MathJax][] or [KaTeX][].
1212

13-
For example, with this LaTeX markup:
13+
For example, this LaTeX markup:
1414

1515
```text
1616
\[
@@ -21,7 +21,7 @@ JS(\hat{y} || y) &= \frac{1}{2}(KL(y||\frac{y+\hat{y}}{2}) + KL(\hat{y}||\frac{y
2121
\]
2222
```
2323

24-
The MathJax display engine renders this:
24+
Is rendered to:
2525

2626
\[
2727
\begin{aligned}
@@ -195,7 +195,7 @@ To use KaTeX instead of MathJax, replace the _partial_ template from [Step 2][]
195195
src="https://cdn.jsdelivr.net/npm/katex@0.16.25/dist/contrib/auto-render.min.js"
196196
integrity="sha384-hCXGrW6PitJEwbkoStFjeJxv+fSOOQKOPbJxSfM6G5sWZjAyWhXiTIIAmQqnlLlh"
197197
crossorigin="anonymous"
198-
onload="renderMathInElement(document.body);">
198+
onload="renderMathInElement(document.body);">
199199
</script>
200200
<script>
201201
document.addEventListener("DOMContentLoaded", function() {

‎content/en/functions/transform/ToMath.md‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ output
6363
With `html` and `htmlAndMathml` you must include the KaTeX style sheet within the `head` element of your base template.
6464

6565
```html
66-
<link href="https://cdn.jsdelivr.net/npm/katex@0.16.23/dist/katex.min.css" rel="stylesheet">
66+
<link
67+
rel="stylesheet"
68+
href="https://cdn.jsdelivr.net/npm/katex@0.16.25/dist/katex.min.css"
69+
integrity="sha384-WcoG4HRXMzYzfCgiyfrySxx90XSl2rxY5mnVY5TwtWE6KLrArNKn0T/mOgNL0Mmi"
70+
crossorigin="anonymous"
71+
>
72+
```
6773

6874
strict
6975
: {{< new-in 0.147.6 />}}
@@ -132,7 +138,12 @@ Step 3
132138
<head>
133139
{{ $noop := .WordCount }}
134140
{{ if .Page.Store.Get "hasMath" }}
135-
<link href="https://cdn.jsdelivr.net/npm/katex@0.16.23/dist/katex.min.css" rel="stylesheet">
141+
<link
142+
rel="stylesheet"
143+
href="https://cdn.jsdelivr.net/npm/katex@0.16.25/dist/katex.min.css"
144+
integrity="sha384-WcoG4HRXMzYzfCgiyfrySxx90XSl2rxY5mnVY5TwtWE6KLrArNKn0T/mOgNL0Mmi"
145+
crossorigin="anonymous"
146+
>
136147
{{ end }}
137148
</head>
138149
```

‎content/en/render-hooks/passthrough.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ Then, in your base template, conditionally include the KaTeX CSS within the head
104104
<head>
105105
{{ $noop := .WordCount }}
106106
{{ if .Page.Store.Get "hasMath" }}
107-
<link href="https://cdn.jsdelivr.net/npm/katex@0.16.23/dist/katex.min.css" rel="stylesheet">
107+
<link
108+
rel="stylesheet"
109+
href="https://cdn.jsdelivr.net/npm/katex@0.16.25/dist/katex.min.css"
110+
integrity="sha384-WcoG4HRXMzYzfCgiyfrySxx90XSl2rxY5mnVY5TwtWE6KLrArNKn0T/mOgNL0Mmi"
111+
crossorigin="anonymous"
112+
>
108113
{{ end }}
109114
</head>
110115
```

‎layouts/baseof.html‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@
2727
{{ $noop := .WordCount }}
2828
{{ if .Page.Store.Get "hasMath" }}
2929
<link
30-
href="https://cdn.jsdelivr.net/npm/katex@0.16.23/dist/katex.min.css"
31-
rel="stylesheet">
30+
rel="stylesheet"
31+
href="https://cdn.jsdelivr.net/npm/katex@0.16.25/dist/katex.min.css"
32+
integrity="sha384-WcoG4HRXMzYzfCgiyfrySxx90XSl2rxY5mnVY5TwtWE6KLrArNKn0T/mOgNL0Mmi"
33+
crossorigin="anonymous"
34+
>
3235
{{ end }}
3336
{{ partial "layouts/head/head.html" . }}
3437
</head>

0 commit comments

Comments
 (0)