Add logic for Default author. Make parameter lowercase for easy of validation.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
{{ $author := .Page.Params.author
|
||||
}}{{ if or (eq $author "authorBug") (eq $author "bug")
|
||||
{{ $author := (lower .Page.Params.author)
|
||||
}}{{ if or (eq $author "authorbug") (eq $author "bug")
|
||||
}}{{ .Scratch.Set "author" .Site.Params.authorBug
|
||||
}}{{ else if or (eq $author "authorHyperling") (eq $author "hyperling")
|
||||
}}{{ else if or (eq $author "authorhyperling") (eq $author "hyperling")
|
||||
}}{{ .Scratch.Set "author" .Site.Params.authorHyperling
|
||||
}}{{ else if or (eq $author "authorHyperVegan") (eq $author "hypervegan")
|
||||
}}{{ else if or (eq $author "authorhypervegan") (eq $author "hypervegan")
|
||||
}}{{ .Scratch.Set "author" .Site.Params.authorHyperVegan
|
||||
}}{{ else
|
||||
}}{{ 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
|
||||
|
||||
Reference in New Issue
Block a user