Learning if-then in Hugo/Go templates.
This commit is contained in:
7
layouts/shortcodes/author.html
Normal file
7
layouts/shortcodes/author.html
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{{ if eq (.Get 0) "bug" }}
|
||||||
|
{{ print "Bug" }}
|
||||||
|
{{ else if eq (.Get 0) "hyperling" }}
|
||||||
|
{{ print "Hyperling" }}
|
||||||
|
{{ else if eq (.Get 0) "hypervegan" }}
|
||||||
|
{{ print "HyperVegan" }}'
|
||||||
|
{{ end }}
|
||||||
Reference in New Issue
Block a user