aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-04-18 21:32:47 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2022-04-18 21:38:38 +0200
commitaa256c58d1d2bac8ea6e67b8f079f1804edb5ca8 (patch)
tree491283185ebd0e7955a95b316274e8907d1fb40a
parentposts: redesign feed (diff)
downloadjekyll-theme-aa256c58d1d2bac8ea6e67b8f079f1804edb5ca8.tar.gz
jekyll-theme-aa256c58d1d2bac8ea6e67b8f079f1804edb5ca8.zip
posts: remove extra spaces in feed
-rw-r--r--_includes/jekyll-theme/posts/feed.html8
-rw-r--r--_layouts/post.html8
2 files changed, 12 insertions, 4 deletions
diff --git a/_includes/jekyll-theme/posts/feed.html b/_includes/jekyll-theme/posts/feed.html
index 4fe4a29..cc2f52b 100644
--- a/_includes/jekyll-theme/posts/feed.html
+++ b/_includes/jekyll-theme/posts/feed.html
@@ -7,9 +7,13 @@
<h3>{{ post.title }}</h3>
<div class="post-date">
<p class="text-muted">
- {% if post.category %}
+ {%- 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>&nbsp;<span class="category">{{ post.category }}</span>
- {% endif %}
+ {%- endif -%}
<span class="glyphicon glyphicon-time"></span>&nbsp;{{ post.date | date: '%-d&nbsp;%b&nbsp;%Y' }}
</p>
</div>
diff --git a/_layouts/post.html b/_layouts/post.html
index 740da65..92fa965 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -5,9 +5,13 @@ layout: default
<h1>{{ page.title }}</h1>
<div class="post-date">
<p class="text-muted">
- {% if page.category %}
+ {%- comment -%}
+ Collapse the Liquid whitespace here, so that no extra spaces
+ between <span>s are introduced.
+ {%- endcomment -%}
+ {%- if page.category -%}
<span class="glyphicon glyphicon-folder-open"></span>&nbsp;<a class="category" href="{{ '/' | relative_url }}{{ page.category | slugify: 'pretty' }}/">{{ page.category }}</a>
- {% endif %}
+ {%- endif -%}
<span class="glyphicon glyphicon-time"></span>&nbsp;{{ page.date | date: '%-d&nbsp;%b&nbsp;%Y' }}
</p>
</div>