diff --git a/README.md b/README.md index 5067719..fbdcc21 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,9 @@ params: # transparent navbar and the main logo will be used in the non-transparent navbar. # It will be default to the theme logos if not provided. logo: - main: assets/images/main-logo.png - inverted: assets/images/inverted-logo.png - favicon: assets/images/favicon.png + main: /assets/images/main-logo.png + inverted: /assets/images/inverted-logo.png + favicon: /assets/images/favicon.png # GitHub repo URL of your site gitRepo: https://github.com/hossainemruz/toha-example-site diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index b549904..4b5c584 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -15,7 +15,7 @@ languages: bn: languageName: বাংলা weight: 3 - de: + de: languageName: Deutsch weight: 4 id: @@ -54,9 +54,9 @@ params: # transparent navbar and the main logo will be used in the non-transparent navbar. # It will be default to the theme logos if not provided. logo: - main: assets/images/main-logo.png - inverted: assets/images/inverted-logo.png - favicon: assets/images/favicon.png + main: /assets/images/main-logo.png + inverted: /assets/images/inverted-logo.png + favicon: /assets/images/favicon.png # GitHub repo URL of your site gitRepo: https://github.com/hossainemruz/toha-example-site diff --git a/layouts/partials/helpers/get-author-image.html b/layouts/partials/helpers/get-author-image.html index 9ab6360..dc7d15c 100644 --- a/layouts/partials/helpers/get-author-image.html +++ b/layouts/partials/helpers/get-author-image.html @@ -1,7 +1,12 @@ -{{ $authorImage:= "/assets/images/default-avatar.png"}} -{{ if .Site.Data.site.author}} - {{ $authorImage = .Site.Data.site.author.image | relURL }} -{{ end}} +{{ $author:= .Site.Data.author }} +{{ if (index .Site.Data .Site.Language.Lang).author }} + {{ $author = (index .Site.Data .Site.Language.Lang).author }} +{{ end }} +{{ $authorImage:= "/assets/images/default-avatar.png" }} +{{ if $author.image }} + {{ $authorImage = $author.image }} +{{ end }} + {{ if eq (printf "%T" .Params.author ) "maps.Params" }} {{ with .Params.author }} {{ if .image }} diff --git a/layouts/partials/sections/home.html b/layouts/partials/sections/home.html index 76715f7..65d1494 100644 --- a/layouts/partials/sections/home.html +++ b/layouts/partials/sections/home.html @@ -15,12 +15,12 @@ {{ $sections = (index .Site.Data .Site.Language.Lang).sections }} {{ end }} -{{ $backgroundImage:= "assets/images/default-background.jpg" }} +{{ $backgroundImage:= "/assets/images/default-background.jpg" }} {{ if .Site.Params.background }} {{ $backgroundImage = .Site.Params.background }} {{ end }} -{{ $authorImage:= "assets/images/default-avatar.png" }} +{{ $authorImage:= "/assets/images/default-avatar.png" }} {{ if $author.image }} {{ $authorImage = $author.image }} {{ end }}