Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mikeblum/hugo-now.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blum <mike.blum@logicgate.com>2018-11-19 00:06:51 +0300
committerMike Blum <mike.blum@logicgate.com>2018-11-19 00:06:51 +0300
commit84651dfe76d27b9507b1ee06b2b05771ea4411c4 (patch)
tree6e3e36d5b6e9a833ddd7d63fab85b9194bb25ebe
parent498c5b00e3734b4c02344eaa4cdaaea85445b7eb (diff)
[GH-02] fix TOC headers
-rw-r--r--layouts/partials/table-of-contents.html12
1 files changed, 7 insertions, 5 deletions
diff --git a/layouts/partials/table-of-contents.html b/layouts/partials/table-of-contents.html
index 2b6f532..e0d72f1 100644
--- a/layouts/partials/table-of-contents.html
+++ b/layouts/partials/table-of-contents.html
@@ -18,11 +18,13 @@
<ul class="toc-h{{ . }}">
{{end}}
{{ $base := ($.Page.File.LogicalName) }}
- {{ $anchorId := ($header | plainify | htmlEscape | urlize) }}
+ {{ $anchorId := ($header | plainify | htmlUnescape | anchorize) }}
{{ $href := delimit (slice $base $anchorId) "#" | string }}
- <a href="{{ relref $.Page $href }}">
- <li>{{ $header | plainify | htmlEscape }}</li>
- </a>
+ <li>
+ <a href="{{ relref $.Page $href }}">
+ {{ $header | plainify | htmlUnescape | emojify }}
+ </a>
+ </li>
<!-- close list -->
{{ range seq $next_heading }}
</ul>
@@ -31,4 +33,4 @@
{{end}}
{{ end }}
</div>
-{{ end }} \ No newline at end of file
+{{ end }}