diff --git a/_includes/components/sections/hero.njk b/_includes/components/sections/hero.njk index 055c13f..6763ee9 100644 --- a/_includes/components/sections/hero.njk +++ b/_includes/components/sections/hero.njk @@ -5,12 +5,12 @@ {% set heroConfig = homepageConfig.hero or {} %} {% set id = homepageConfig.identity if (homepageConfig and homepageConfig.identity) else {} %} -{% set authorName = id.name or site.author.name %} -{% set authorAvatar = id.avatar or site.author.avatar %} -{% set authorTitle = id.title or site.author.title %} -{% set authorBio = id.bio or site.author.bio %} -{% set siteDescription = id.description or site.description %} -{% set socialLinks = id.social if (id.social and id.social.length) else site.social %} +{% set authorName = id.name if (id.name is defined) else site.author.name %} +{% set authorAvatar = id.avatar if (id.avatar is defined) else site.author.avatar %} +{% set authorTitle = id.title if (id.title is defined) else site.author.title %} +{% set authorBio = id.bio if (id.bio is defined) else site.author.bio %} +{% set siteDescription = id.description if (id.description is defined) else site.description %} +{% set socialLinks = id.social if (id.social is defined) else site.social %}
@@ -31,9 +31,11 @@

{{ authorName }}

+ {% if authorTitle %}

{{ authorTitle }}

+ {% endif %} {% if authorBio %}

{{ authorBio }} diff --git a/theme/_includes/components/sections/hero.njk b/theme/_includes/components/sections/hero.njk index 0366965..e8ff3df 100644 --- a/theme/_includes/components/sections/hero.njk +++ b/theme/_includes/components/sections/hero.njk @@ -5,12 +5,12 @@ {% set heroConfig = homepageConfig.hero or {} %} {% set id = homepageConfig.identity if (homepageConfig and homepageConfig.identity) else {} %} -{% set authorName = id.name or site.author.name %} -{% set authorAvatar = id.avatar or site.author.avatar %} -{% set authorTitle = id.title or site.author.title %} -{% set authorBio = id.bio or site.author.bio %} -{% set siteDescription = id.description or site.description %} -{% set socialLinks = id.social if (id.social and id.social.length) else site.social %} +{% set authorName = id.name if (id.name is defined) else site.author.name %} +{% set authorAvatar = id.avatar if (id.avatar is defined) else site.author.avatar %} +{% set authorTitle = id.title if (id.title is defined) else site.author.title %} +{% set authorBio = id.bio if (id.bio is defined) else site.author.bio %} +{% set siteDescription = id.description if (id.description is defined) else site.description %} +{% set socialLinks = id.social if (id.social is defined) else site.social %}

@@ -29,9 +29,11 @@

{{ authorName }}

+ {% if authorTitle %}

{{ authorTitle }}

+ {% endif %} {% if authorBio %}

{{ authorBio }}