diff --git a/config.yaml b/config.yaml index 8fff8b6..97a64f4 100644 --- a/config.yaml +++ b/config.yaml @@ -9,3 +9,12 @@ enableGitInfo: true markup: tableOfContents: endLevel: 4 + +module: + imports: + - path: github.com/alex-shpak/hugo-book + +params: + # https://themes.gohugo.io/themes/hugo-book/ + BookSection: "*" + # BookTheme: auto # erst Grafiken anpassen diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..fcfb535 --- /dev/null +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..56905fe --- /dev/null +++ b/go.sum @@ -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= diff --git a/layouts/_default/_markup/render-codeblock-mermaid.html b/layouts/_default/_markup/render-codeblock-mermaid.html new file mode 100644 index 0000000..6a0664e --- /dev/null +++ b/layouts/_default/_markup/render-codeblock-mermaid.html @@ -0,0 +1,12 @@ +{{ if not (.Page.Scratch.Get "mermaid") }} + + +{{ with resources.Get "mermaid.json" }} + +{{ end }} +{{ .Page.Scratch.Set "mermaid" true }} +{{ end }} + +

+ {{- .Inner -}} +

diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..f0c6253 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,6 @@ +{{ define "main" }} +
+

{{- .Page.Title -}}

+ {{- .Content -}} +
+{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..f0c6253 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,6 @@ +{{ define "main" }} +
+

{{- .Page.Title -}}

+ {{- .Content -}} +
+{{ end }}