diff --git a/_includes/layouts/home.njk b/_includes/layouts/home.njk index 1a90b60..cdab261 100644 --- a/_includes/layouts/home.njk +++ b/_includes/layouts/home.njk @@ -81,12 +81,15 @@ withSidebar: true

Recent Posts

{% for post in collections.posts | head(10) %} -
-

- - {{ post.data.title or post.data.name or "Untitled" }} - -

+
+ {% set postTitle = ((post.data.title or post.data.name or "") | trim) %} + {% if postTitle %} +

+ + {{ 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: true

Recent Posts

{% for post in collections.posts | head(10) %} -
-

- - {{ post.data.title or post.data.name or "Untitled" }} - -

+
+ {% set postTitle = ((post.data.title or post.data.name or "") | trim) %} + {% if postTitle %} +

+ + {{ 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 %}