{{/* Table of contents for the generated tool catalog page. hextra's toc.html builds the right-side TOC from .Fragments.Headings, which Hugo only populates from Markdown headings parsed by Goldmark. The catalog's

group headings are emitted as raw HTML by partials/tool-catalog.html, so they never reach .Fragments and the stock TOC renders empty. This rebuilds the TOC from the same data/tool_groups.yaml the catalog iterates, listing only groups that actually have tools (matching tool-catalog.html's `with $rows` guard). */}} {{- $onThisPage := (T "onThisPage") | default "On this page" -}} {{- $editThisPage := (T "editThisPage") | default "Edit this page" -}} {{- $backToTop := (T "backToTop") | default "Scroll to top" -}} {{- $tools := site.Data.tools -}} {{- $groups := slice -}} {{- range $g := site.Data.tool_groups -}} {{- if where $tools "group" $g.key -}} {{- $groups = $groups | append $g -}} {{- end -}} {{- end -}}