Add helper function for generating section ID

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
hossainemruz 2021-03-26 23:59:55 +06:00
parent d5c1729c88
commit 38fc754445
2 changed files with 7 additions and 10 deletions

View file

@ -0,0 +1,5 @@
{{ $sectionID := replace (lower .section.name) " " "-" }}
{{ if .section.id }}
{{ $sectionID = .section.id }}
{{ end }}
{{ return $sectionID }}