MathJax#
Step 1#
Create layouts/partials/extend_head.html:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| {{ if or .Params.math .Site.Params.math }}
<script>
MathJax = {
tex: {
inlineMath: [['\\(', '\\)'], ['$', '$']],
displayMath: [['$$', '$$'], ['\\[', '\\]']],
processEscapes: true,
processEnvironments: true
},
options: {
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
}
};
</script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
{{ end }}
|
Step 2#
Create layouts/_default/baseof.html:
1
| {{ partial "extend-head.html" . }}
|
Step 3#
Edit hugo.yaml, add markup->goldmark section and enable math:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| markup:
goldmark:
renderer:
unsafe: true
extensions:
passthrough:
delimiters:
block:
- - \[
- \]
- - $$
- $$
inline:
- - \(
- \)
- - $
- $
enable: true
params:
math: true
|
Favicon#
https://favicon.io/emoji-favicons/
Put images into static/images/favicon/
Edit hugo.yaml:
1
2
3
4
5
6
7
| params:
assets:
favicon: "images/favicon/favicon.ico"
favicon16x16: "images/favicon/favicon-16x16.png"
favicon32x32: "images/favicon/favicon-32x32.png"
apple_touch_icon: "images/favicon/apple-touch-icon.png"
# safari_pinned_tab: "images/favicon/safari-pinned-tab.svg"
|