Replaces tag index plugin with native jekyll features (#307)

* remove tag _gen plugin and its folder

* remove deprecated tag index layout

* add tag index page

* link tag index page in nav bar, enable tag links by default

* add button spacer in main css

* fix tag links in post view

* fix tag links on index and pagination

* tag link instuctions removed. it's enabled as default
This commit is contained in:
Marco Blessing 2018-01-19 05:58:00 +01:00 committed by Dean Attali
parent 22e77cff59
commit 3664e56dbd
8 changed files with 50 additions and 88 deletions

View file

@ -12,7 +12,7 @@ layout: base
{% assign gh_split = page.gh-repo | split:'/' %}
{% assign gh_user = gh_split[0] %}
{% assign gh_repo = gh_split[1] %}
<div id="header-gh-btns">
{% if page.gh-badge.size > 0 %}
{% for badge in page.gh-badge %}
@ -22,7 +22,7 @@ layout: base
{% when 'watch'%}
<iframe src="https://ghbtns.com/github-btn.html?user={{ gh_user }}&repo={{ gh_repo }}&type=watch&v=2&count=true" frameborder="0" scrolling="0" width="120px" height="20px"></iframe>
{% when 'fork'%}
<iframe src="https://ghbtns.com/github-btn.html?user={{ gh_user }}&repo={{ gh_repo }}&type=fork&count=true" frameborder="0" scrolling="0" width="120px" height="20px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user={{ gh_user }}&repo={{ gh_repo }}&type=fork&count=true" frameborder="0" scrolling="0" width="120px" height="20px"></iframe>
{% when 'follow'%}
<iframe src="https://ghbtns.com/github-btn.html?user={{ gh_user }}&type=follow&count=true" frameborder="0" scrolling="0" width="220px" height="20px"></iframe>
{% endcase %}
@ -30,7 +30,7 @@ layout: base
{% endif %}
</div>
{% endif %}
<article role="main" class="blog-post">
{{ content }}
</article>
@ -40,7 +40,7 @@ layout: base
Tags:
{% if site.link-tags %}
{% for tag in page.tags %}
<a href="/tag/{{ tag }}">{{ tag }}</a>
<a href="{{ site.baseurl }}/tags#{{- tag -}}">{{- tag -}}</a>
{% endfor %}
{% else %}
{{ page.tags | join: ", " }}
@ -72,4 +72,4 @@ layout: base
{% endif %}
</div>
</div>
</div>
</div>

View file

@ -1,41 +0,0 @@
---
layout: default
---
<h2 class="post_title">{{page.title}}:</h2>
<div class="posts-list">
{% for post in site.posts %}
{% for tag in post.tags %}
{% if tag == page.tag %}
<article class="post-preview">
<a href="{{ post.url | prepend: site.baseurl }}">
<h3 class="post-title">{{ post.title }}</h3>
{% if post.subtitle %}
<h4 class="post-subtitle">
{{ post.subtitle }}
</h4>
{% endif %}
</a>
<p class="post-meta">
Posted on {{ post.date | date: "%B %-d, %Y" }}
</p>
<div class="post-entry">
{{ post.content | strip_html | xml_escape | truncatewords: 50 }}
<a href="{{ post.url | prepend: site.baseurl }}" class="post-read-more">[Read&nbsp;More]</a>
</div>
<div class="blog-tags">
Tags:
{% for tag in post.tags %}
<a href="/tag/{{ tag }}">{{ tag }}</a>
{% endfor %}
</div>
</article>
{% endif %}
{% endfor %}
{% endfor %}
</div>