diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 847a1ff9..1d156010 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -20,7 +20,7 @@ markup: endLevel: 9 params: -# geekdocMenuBundle: true + # geekdocMenuBundle: true geekdocToC: 3 geekdocRepo: https://github.com/thegeeklab/hugo-geekdoc diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html new file mode 100644 index 00000000..7d216793 --- /dev/null +++ b/layouts/_default/_markup/render-heading.html @@ -0,0 +1,18 @@ +{{ $showAnchor := (and (default true .Page.Params.GeekdocAnchor) (default true .Page.Site.Params.GeekdocAnchor)) }} + +{{ if $showAnchor }} +
+ + {{ .Text | safeHTML }} + + + + +
+{{ else }} +
+ + {{ .Text | safeHTML }} + +
+{{ end }} diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html new file mode 100644 index 00000000..281697da --- /dev/null +++ b/layouts/_default/_markup/render-image.html @@ -0,0 +1 @@ +{{ .Text }} diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html new file mode 100644 index 00000000..5a540b4a --- /dev/null +++ b/layouts/_default/_markup/render-link.html @@ -0,0 +1 @@ +{{ .Text | safeHTML }} diff --git a/layouts/partials/content.html b/layouts/partials/content.html index aa84210c..c35e992e 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -1,8 +1 @@ -{{ $showAnchor := (and (default true .Page.Params.GeekdocAnchor) (default true .Site.Params.GeekdocAnchor)) }} - -{{ $.Scratch.Set "content" (.Content | replaceRE `` `` | safeHTML) }} -{{ if $showAnchor }} - {{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(]*>)(.*?)()" (printf `
%s%s%s
` `${1}` `${3}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${3}` `${2}` `${4}`) | safeHTML) }} -{{ end }} - -{{ $.Scratch.Get "content" }} +{{ .Content | replaceRE `` `` | safeHTML }}