From 622d36084a2a03b9d27c939f5a11b2f8871f4aa3 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 13 May 2022 05:17:58 +0200 Subject: posts: separate include for post header --- _includes/jekyll-theme/posts/feed.html | 16 +--------------- _includes/jekyll-theme/posts/header.html | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 15 deletions(-) create mode 100644 _includes/jekyll-theme/posts/header.html (limited to '_includes') diff --git a/_includes/jekyll-theme/posts/feed.html b/_includes/jekyll-theme/posts/feed.html index 5bcf14d..629e4ee 100644 --- a/_includes/jekyll-theme/posts/feed.html +++ b/_includes/jekyll-theme/posts/feed.html @@ -3,21 +3,7 @@ {% else %} {% for post in paginator.posts %} -
-

{{ post.title }}

- -
+ {% include jekyll-theme/posts/header.html feed=true %}
{{ post.excerpt | markdownify }}
{% endfor %} diff --git a/_includes/jekyll-theme/posts/header.html b/_includes/jekyll-theme/posts/header.html new file mode 100644 index 0000000..cadbb95 --- /dev/null +++ b/_includes/jekyll-theme/posts/header.html @@ -0,0 +1,32 @@ +
+ {% assign h = 'h1' %} + {% if include.feed %} + {% assign h = 'h3' %} + {% else %} + {% assign post = page %} + {% endif %} + <{{ h }}>{{ post.title }} + +
-- cgit v1.2.3