diff options
Diffstat (limited to '')
-rw-r--r-- | _includes/jekyll-theme/posts/feed.html | 16 | ||||
-rw-r--r-- | _includes/jekyll-theme/posts/header.html | 32 |
2 files changed, 33 insertions, 15 deletions
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 %} <a href="{{ post.url | relative_url }}" class="feed-entry"> - <div class="post-header"> - <h3>{{ post.title }}</h3> - <div class="post-date"> - <p class="text-muted"> - {%- comment -%} - Collapse the Liquid whitespace here, so that no extra spaces - between <span>s are introduced. - {%- endcomment -%} - {%- if post.category -%} - <span class="glyphicon glyphicon-folder-open"></span> <span class="category">{{ post.category }}</span> - {%- endif -%} - <span class="glyphicon glyphicon-time"></span> {{ post.date | date: '%-d %b %Y' }} - </p> - </div> - </div> + {% include jekyll-theme/posts/header.html feed=true %} <div class="text-muted">{{ post.excerpt | markdownify }}</div> </a> {% 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 @@ +<div class="post-header"> + {% assign h = 'h1' %} + {% if include.feed %} + {% assign h = 'h3' %} + {% else %} + {% assign post = page %} + {% endif %} + <{{ h }}>{{ post.title }}</{{ h }}> + <div class="post-date"> + <p class="text-muted"> + {%- comment -%} + Collapse the Liquid whitespace here, so that no extra spaces + between <span>s are introduced. + {%- endcomment -%} + {%- if post.category -%} + <span class="glyphicon glyphicon-folder-open"></span> + {%- if include.feed -%} + <span class="category"> + {%- else -%} + <a class="category" href="{{ '/' | relative_url }}{{ post.category | slugify: 'pretty' }}/"> + {%- endif -%} + {{ post.category }} + {%- if include.feed -%} + </span> + {%- else -%} + </a> + {%- endif -%} + {%- endif -%} + <span class="glyphicon glyphicon-time"></span> {{ post.date | date: '%-d %b %Y' }} + </p> + </div> +</div> |