- - {{ post.data.title or post.data.name or "Untitled" }} - -
++ + {{ postTitle }} + +
+ {% endif %} {% if post.data.summary %}{{ post.data.summary }}
{% endif %} @@ -94,6 +97,9 @@ withSidebar: true + {% if not postTitle %} + Permalink + {% endif %} {% if post.data.postType %} {{ post.data.postType }} {% endif %} diff --git a/theme/_includes/layouts/home.njk b/theme/_includes/layouts/home.njk index 0f26556..32b0793 100644 --- a/theme/_includes/layouts/home.njk +++ b/theme/_includes/layouts/home.njk @@ -79,12 +79,15 @@ withSidebar: trueRecent Posts
{% for post in collections.posts | head(10) %}
-
-
+ {% set postTitle = ((post.data.title or post.data.name or "") | trim) %}
+ {% if postTitle %}
+
- - {{ post.data.title or post.data.name or "Untitled" }} - -
++ + {{ postTitle }} + +
+ {% endif %} {% if post.data.summary %}{{ post.data.summary }}
{% endif %} @@ -92,6 +95,9 @@ withSidebar: true + {% if not postTitle %} + Permalink + {% endif %} {% if post.data.postType %} {{ post.data.postType }} {% endif %}