hugo-toha/layouts/partials/helpers/get-section-id.html
hossainemruz 38fc754445 Add helper function for generating section ID
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2021-03-26 23:59:55 +06:00

5 lines
No EOL
148 B
HTML

{{ $sectionID := replace (lower .section.name) " " "-" }}
{{ if .section.id }}
{{ $sectionID = .section.id }}
{{ end }}
{{ return $sectionID }}