remove duplicate toc ids #131
| | |
| | | |
| | | go 1.19 |
| | | |
| | | require github.com/onweru/compose v0.0.0-20240111174942-cdf2ef5f4da1 // indirect |
| | | require github.com/onweru/compose v0.0.0-20240111175353-5392252575a2 // indirect |
| | |
| | | github.com/onweru/compose v0.0.0-20230823103345-61fa78130dec/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o= |
| | | github.com/onweru/compose v0.0.0-20240111174942-cdf2ef5f4da1 h1:evqwOllx6XwfmYG2NKGFmfloNQXazxOCPir914Myjpk= |
| | | github.com/onweru/compose v0.0.0-20240111174942-cdf2ef5f4da1/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o= |
| | | github.com/onweru/compose v0.0.0-20240111175353-5392252575a2 h1:jqoBc1FPDJNxRrrieLlRvyKCumTLa5XkehgXz3yBdvE= |
| | | github.com/onweru/compose v0.0.0-20240111175353-5392252575a2/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o= |
| | |
| | | {{- range . }} |
| | | {{- if .IsPage }} |
| | | <h3 class="section_link{{ if eq .RelPermalink $permalink }} active{{ end }}"><a id="docs-{{ anchorize .Title }}" href="{{ .Permalink }}">{{ .Title }}</a></h3> |
| | | {{ $toc_id := printf "toc-%s" (replace (urlize .Title) "." "-") }} |
| | | {{- if ne (print .TableOfContents) ""}} |
| | | {{- .TableOfContents }} |
| | | {{- safeHTML (replace .TableOfContents "TableOfContents" $toc_id) }} |
| | | {{- end }} |
| | | {{- else }} |
| | | {{- template "tree" (dict "page" $page "section" .) }} |