Switch to Hugos built in code highlighter
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
{{ if isset .Params "date" }}<p class="post-date">Posted <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>{{ end }}
|
||||
</header>
|
||||
{{ with .Resources.GetMatch "featuredImage" }}
|
||||
{{ with .Resources.GetMatch "featuredImage" -}}
|
||||
<picture class="post-figure">
|
||||
{{ with $.Resources.GetMatch (replace (.Title) (path.Ext (.Title)) ".webp") -}}
|
||||
<source srcset="{{ .Permalink }}" type="image/webp">
|
||||
@@ -18,7 +18,11 @@
|
||||
<source srcset="{{ $featured.Permalink }}">
|
||||
<img src="{{ $featured.Permalink }}" {{ with .Params.description -}} alt="{{ . }}" {{- end }}>
|
||||
</picture>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{ if .Params.toc -}}
|
||||
<h2>Contents</h2>
|
||||
{{ .TableOfContents }}
|
||||
{{- end }}
|
||||
{{ .Content }}
|
||||
</article>
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.js" integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/contrib/auto-render.min.js" integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe" crossorigin="anonymous"
|
||||
onload="renderMathInElement(document.body);"></script>
|
||||
{{ $corejs := resources.Get "js/core.js" | minify }}
|
||||
<script src="{{ $corejs.Permalink }}"></script>
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user