Merge remote-tracking branch 'origin/main' into style/herman

This commit is contained in:
Caio Lente 2023-10-27 19:31:22 -03:00
commit 488fcc401f
No known key found for this signature in database
GPG key ID: E66D381776EFC03A
4 changed files with 19 additions and 2 deletions

View file

@ -0,0 +1,6 @@
<!-- https://github.com/jmooring/hugo-testing/blob/hugo-forum-topic-40998/layouts/_default/_markup/render-codeblock-katex.html -->
{{ .Page.Store.Set "hasCodeBlock" true }}
<!-- https://www.veriphor.com/articles/code-block-render-hooks/ -->
{{ $result := transform.HighlightCodeBlock . }}
{{ $result.Wrapped }}

View file

@ -14,8 +14,10 @@
{{ $style := resources.Get "herman.css" | minify }}
<link href="{{ $style.RelPermalink }}" rel="stylesheet">
{{ $syntax := resources.Get "syntax.css" | minify }}
<link href="{{ $syntax.RelPermalink }}" rel="stylesheet">
{{ if (.Page.Store.Get "hasCodeBlock") }}
{{ $syntax := resources.Get "syntax.css" | minify }}
<link href="{{ $syntax.RelPermalink }}" rel="stylesheet">
{{ end }}
{{ with .Params.style }}
{{ $extra := resources.Get . | minify }}