Adding disquis and category, tags to posts
This commit is contained in:
parent
f5cc191902
commit
4fe871f5c1
|
@ -4,6 +4,39 @@ layout: default
|
|||
|
||||
<!-- Post Header -->
|
||||
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
|
||||
|
||||
<!-- category link -->
|
||||
{% if post.category %}
|
||||
{% for site_category in site.data.categories %}
|
||||
{% if site_category.slug == post.category %}
|
||||
{% assign category = site_category %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if category %}
|
||||
{% capture category_content %} in <a href="/meta/category/{{ category.slug }}/">{{ category.name }}</a>{% endcapture %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% assign category_content = '' %}
|
||||
{% endif %}
|
||||
|
||||
<!-- tag links -->
|
||||
{% if post.tags.size > 0 %}
|
||||
{% capture tags_content %} with tags {% endcapture %}
|
||||
{% for post_tag in post.tags %}
|
||||
{% for data_tag in site.data.tags %}
|
||||
{% if data_tag.slug == post_tag %}
|
||||
{% assign tag = data_tag %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if tag %}
|
||||
{% capture tags_content_temp %}{{ tags_content }}<a href="/meta/tag/{{ tag.slug }}/">{{ tag.name }}</a>{% if forloop.last == false %}, {% endif %}{% endcapture %}
|
||||
{% assign tags_content = tags_content_temp %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% assign tags_content = '' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
|
@ -12,7 +45,7 @@ layout: default
|
|||
{% if page.subtitle %}
|
||||
<h2 class="subheading">{{ page.subtitle }}</h2>
|
||||
{% endif %}
|
||||
<span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %} on {{ page.date | date: "%B %-d, %Y" }}</span>
|
||||
<span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %} on {{ page.date | date: "%B %-d, %Y" }} {{ category_content }}{{ tags_content }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -42,6 +75,8 @@ layout: default
|
|||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% include disqus.html %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue