feat(tags): this adds support for post, link, book, show and movie tags with a tag list view and per tag pages
This commit is contained in:
parent
3d866262ca
commit
6fdc0b56b9
35 changed files with 500 additions and 70 deletions
|
@ -22,6 +22,9 @@ permalink: "/links/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}
|
|||
<article>
|
||||
<a href="{{ link.link }}" title="{{ link.title | escape }}"><strong>{{ link.title }}</strong></a>
|
||||
{% if link.author %} via <a href="{{ link.author.url }}">{{ link.author.name }}</a>{% endif %}
|
||||
{% render "blocks/tags.liquid",
|
||||
tags:link.tags
|
||||
%}
|
||||
</article>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
|
@ -26,6 +26,9 @@ permalink: "/posts/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}
|
|||
<h3>
|
||||
<a href="{{ post.url }}">{{ post.title }}</a>
|
||||
</h3>
|
||||
{% render "blocks/tags.liquid",
|
||||
tags:post.tags
|
||||
%}
|
||||
<p>{{ post.description | markdown }}</p>
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
|
|
@ -13,9 +13,10 @@ schema: blog
|
|||
{{ post.date | date: "%B %e, %Y" }}
|
||||
</time>
|
||||
</aside>
|
||||
<h3>
|
||||
{{ post.title }}
|
||||
</h3>
|
||||
<h3>{{ post.title }}</h3>
|
||||
{% render "blocks/tags.liquid",
|
||||
tags:post.tags
|
||||
%}
|
||||
<div>
|
||||
{% render "blocks/banners/old-post.liquid",
|
||||
isOldPost:post.old_post
|
||||
|
|
26
src/pages/sections/tags.html
Normal file
26
src/pages/sections/tags.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
title: Tags
|
||||
description: All of the tags I've applied to content on this site — posts, links, books, movies and shows.
|
||||
permalink: /tags/index.html
|
||||
---
|
||||
<h2 class="page-title">Tags</h2>
|
||||
<p>All of the tags I've applied to content on this site — posts, links, books, movies and shows. <a class="search" href="/search">You can search my site as well</a>.</p>
|
||||
<hr />
|
||||
<nav aria-label="Tag navigation">
|
||||
{% for group in tags %}
|
||||
<a href="#{{ group.letter }}">{{ group.letter }}</a>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
{% for group in tags %}
|
||||
<section id="{{ group.letter }}">
|
||||
<h3>{{ group.letter }}</h3>
|
||||
<ul class="tag-list">
|
||||
{% for tag in group.tags %}
|
||||
<li>
|
||||
<a href="/tags/{{ tag.tag | downcase }}">#{{ tag.tag }}</a>
|
||||
<span class="count">({{ tag.uses }})</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endfor %}
|
Loading…
Add table
Add a link
Reference in a new issue