From 095fbd0e31e037b225b52305b61f5e8d99bf6ddf Mon Sep 17 00:00:00 2001 From: timurgordon Date: Mon, 12 Sep 2022 11:58:42 +0300 Subject: [PATCH] blog fixes --- templates/blogPage.html | 5 +++-- templates/partials/featuredBlog.html | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/templates/blogPage.html b/templates/blogPage.html index 7598b34d5..f2b7cd203 100644 --- a/templates/blogPage.html +++ b/templates/blogPage.html @@ -2,8 +2,9 @@ {% block content %} {% if page.taxonomies.people %} - {% set people = get_section(path="people/_index.md") %} - {% if people.pages is containing(page.taxonomies.people[0]) %} + {% set people = get_section(path="people/_index.md") %} + {% set pages_str = people.pages | json_encode() | as_str %} + {% if pages_str is containing(page.taxonomies.people[0]) %} {% set author_path = 'people/' ~ page.taxonomies.people[0] ~ '/index.md' %} {% set author = get_page(path=author_path) %} {% endif %} diff --git a/templates/partials/featuredBlog.html b/templates/partials/featuredBlog.html index f7898bacf..507b6cf5e 100644 --- a/templates/partials/featuredBlog.html +++ b/templates/partials/featuredBlog.html @@ -1,6 +1,10 @@ {% if featured.taxonomies.people %} - {% set author_path = 'people/' ~ featured.taxonomies.people[0] ~ '/index.md' %} - {% set author = get_page(path=author_path) %} + {% set people = get_section(path="people/_index.md") %} + {% set pages_str = people.pages | json_encode() | as_str %} + {% if pages_str is containing(featured.taxonomies.people[0]) %} + {% set author_path = 'people/' ~ featured.taxonomies.people[0] ~ '/index.md' %} + {% set author = get_page(path=author_path) %} + {% endif %} {% endif %}