Make theme compatible with hugoBasicExamples
Signed-off-by: hossainemruz <emruz@appscode.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
{{ $authorImage:= "/assets/images/default-avatar.svg"}}
|
||||
{{ if isset .author "image" }}
|
||||
{{ $authorImage = .author.image }}
|
||||
{{ if eq (printf "%T" .Params.author ) "maps.Params" }}
|
||||
{{ with .Params.author }}
|
||||
{{ if .image }}
|
||||
{{ $authorImage = .image }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ return $authorImage }}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{{ $authorName:= "John Doe"}}
|
||||
{{ if isset .author "name" }}
|
||||
{{ $authorName = .author.name }}
|
||||
{{ if eq (printf "%T" .Params.author ) "maps.Params" }}
|
||||
{{ with .Params.author }}
|
||||
{{ if .name }}
|
||||
{{ $authorName = .name }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ return $authorName }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{ $categories:= ""}}
|
||||
{{ if .categories }}
|
||||
{{ $categories = delimit .categories "," }}
|
||||
{{ if .Params.categories }}
|
||||
{{ $categories = delimit .Params.categories "," }}
|
||||
{{ end }}
|
||||
{{ return $categories }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{ $heroImage:= "/assets/images/default-hero.jpg"}}
|
||||
{{ if .hero }}
|
||||
{{ $heroImage = .hero }}
|
||||
{{ if .Params.hero }}
|
||||
{{ $heroImage = .Params.hero }}
|
||||
{{ end }}
|
||||
{{ return $heroImage }}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{{ $profileImage:= "/assets/images/default-avatar.svg"}}
|
||||
{{ if .Site.Data.home.image }}
|
||||
{{ $profileImage = .Site.Data.home.image }}
|
||||
{{ end }}
|
||||
{{ return $profileImage }}
|
||||
Reference in New Issue
Block a user