Files
hugo-recipes/layouts/shortcodes/author.html

17 lines
662 B
HTML

{{ $author := (lower (.Get 0))
}}{{ if or (eq $author "authorbug") (eq $author "bug")
}}{{ .Scratch.Set "author" .Site.Params.authorBug
}}{{ else if or (eq $author "authorhyperling") (eq $author "hyperling")
}}{{ .Scratch.Set "author" .Site.Params.authorHyperling
}}{{ else if or (eq $author "authorhypervegan") (eq $author "hypervegan")
}}{{ .Scratch.Set "author" .Site.Params.authorHyperVegan
}}{{ else if and ($author) (not (eq $author ""))
}}{{ .Scratch.Set "author" $author
}}{{ else
}}{{ .Scratch.Set "author" .Site.Params.authorDefault
}}{{ end
}}{{ $author := .Scratch.Get "author"
}}{{ if $author
}}{{ print $author
}}{{ end
}}