add hugo-book theme module
customization: - automatically add title to every page - allow mermaid codeblocks to render without shortcodespull/1/head
parent
ab42f7fee0
commit
15ec6bbc19
@ -0,0 +1,5 @@
|
||||
module git.freifunk-franken.de/freifunk-franken/docs
|
||||
|
||||
go 1.19
|
||||
|
||||
require github.com/alex-shpak/hugo-book v0.0.0-20221111100854-d5b75f4fb3aa // indirect
|
@ -0,0 +1,2 @@
|
||||
github.com/alex-shpak/hugo-book v0.0.0-20221111100854-d5b75f4fb3aa h1:VthswmcR+7NtpamidIRuFq+8JRAz4v+s7xVJ0MmeLqM=
|
||||
github.com/alex-shpak/hugo-book v0.0.0-20221111100854-d5b75f4fb3aa/go.mod h1:L4NMyzbn15fpLIpmmtDg9ZFFyTZzw87/lk7M2bMQ7ds=
|
@ -0,0 +1,12 @@
|
||||
{{ if not (.Page.Scratch.Get "mermaid") }}
|
||||
<!-- Include mermaid only first time -->
|
||||
<script src="{{ "mermaid.min.js" | relURL }}"></script>
|
||||
{{ with resources.Get "mermaid.json" }}
|
||||
<script>mermaid.initialize({{ .Content | safeJS }})</script>
|
||||
{{ end }}
|
||||
{{ .Page.Scratch.Set "mermaid" true }}
|
||||
{{ end }}
|
||||
|
||||
<p class="mermaid">
|
||||
{{- .Inner -}}
|
||||
</p>
|
@ -0,0 +1,6 @@
|
||||
{{ define "main" }}
|
||||
<article class="markdown">
|
||||
<h1>{{- .Page.Title -}}</h1>
|
||||
{{- .Content -}}
|
||||
</article>
|
||||
{{ end }}
|
@ -0,0 +1,6 @@
|
||||
{{ define "main" }}
|
||||
<article class="markdown">
|
||||
<h1>{{- .Page.Title -}}</h1>
|
||||
{{- .Content -}}
|
||||
</article>
|
||||
{{ end }}
|
Loading…
Reference in New Issue