Add helper function for generating section ID
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
d5c1729c88
commit
38fc754445
2 changed files with 7 additions and 10 deletions
5
layouts/partials/helpers/get-section-id.html
Normal file
5
layouts/partials/helpers/get-section-id.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ $sectionID := replace (lower .section.name) " " "-" }}
|
||||
{{ if .section.id }}
|
||||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
{{ return $sectionID }}
|
Loading…
Add table
Add a link
Reference in a new issue