mirror of https://github.com/onweru/compose.git

weru
11.16.2024 61cf3194699cacb6393a5c2b0a211546815aa068
remove duplicate toc ids #131
3 files modified
7 ■■■■ changed files
exampleSite/go.mod 2 ●●● patch | view | raw | blame | history
exampleSite/go.sum 2 ●●●●● patch | view | raw | blame | history
layouts/partials/sidebar.html 3 ●●●● patch | view | raw | blame | history
exampleSite/go.mod
@@ -2,4 +2,4 @@
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
exampleSite/go.sum
@@ -16,3 +16,5 @@
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=
layouts/partials/sidebar.html
@@ -15,8 +15,9 @@
        {{- 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" .) }}