fix issue #52
This commit is contained in:
parent
7a140d4bba
commit
a0a89797ed
2 changed files with 5 additions and 5 deletions
|
@ -1,11 +1,12 @@
|
||||||
---
|
---
|
||||||
author: Mivinci
|
author: Mivinci
|
||||||
title: Math Typesetting
|
title: Math Typesetting
|
||||||
date: 2021-07-18T10:52:59+08:00
|
date: 2020-07-18T10:52:59+08:00
|
||||||
description: A brief guide to write mathematical notation.
|
description: A brief guide to write mathematical notation.
|
||||||
math: true
|
math: true
|
||||||
tags:
|
tags:
|
||||||
- KaTex
|
- KaTex
|
||||||
|
- markdown
|
||||||
---
|
---
|
||||||
|
|
||||||
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries like [KaTeX](https://katex.org) the one that Minima uses. Here's what you can do in the configuration file to enable it.
|
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries like [KaTeX](https://katex.org) the one that Minima uses. Here's what you can do in the configuration file to enable it.
|
||||||
|
|
|
@ -15,12 +15,11 @@
|
||||||
</title>
|
</title>
|
||||||
{{ $favicon := "favicon.ico" }}
|
{{ $favicon := "favicon.ico" }}
|
||||||
<link rel="shortcut icon" href="{{ $favicon | relURL }}" type="image/x-icon" />
|
<link rel="shortcut icon" href="{{ $favicon | relURL }}" type="image/x-icon" />
|
||||||
{{ $hash := now.Unix }}
|
{{ $options := (dict "targetPath" "minima.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||||
{{ $options := (dict "targetPath" (printf `minima.%d.css` $hash) "outputStyle" "compressed" "enableSourceMap" true) }}
|
|
||||||
{{ $style := resources.Get "css/main.scss" | resources.ToCSS $options }}
|
{{ $style := resources.Get "css/main.scss" | resources.ToCSS $options }}
|
||||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||||
{{ $options = (dict "targetPath" (printf `minima.%d.js` $hash) "minify" true) }}
|
{{ $options = (dict "targetPath" "minima.js" "minify" true) }}
|
||||||
{{ $js := resources.Get "js/main.js" | js.Build $options | resources.ExecuteAsTemplate (printf `minima.%d.js` $hash) . }}
|
{{ $js := resources.Get "js/main.js" | js.Build $options | resources.ExecuteAsTemplate "minima.js" . }}
|
||||||
<script defer type="text/javascript" src="{{ $js.RelPermalink }}"></script>
|
<script defer type="text/javascript" src="{{ $js.RelPermalink }}"></script>
|
||||||
{{ if .IsTranslated }}
|
{{ if .IsTranslated }}
|
||||||
{{ range .Translations }}
|
{{ range .Translations }}
|
||||||
|
|
Loading…
Reference in a new issue