Skip to content

Instantly share code, notes, and snippets.

@curiositry
Last active July 28, 2021 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curiositry/02b9c36234d05a06c574691f2c6ff0e0 to your computer and use it in GitHub Desktop.
Save curiositry/02b9c36234d05a06c574691f2c6ff0e0 to your computer and use it in GitHub Desktop.
Ghost Tags List
{{!< default}}
{{> content-header}}
<main class="container content" id="content">
<article class="page {{post_class}}">
{{#post}}
<header class="page__header">
<h1 class="page__title mt0">{{title}}</h1>
<section class="page__meta">
<time class="page__date" hidden datetime="{{date format='YYYY-MM-DD'}}">Published on {{date format="MMMM Do YYYY"}}</time>
</section>
</header>
<section class="page__content" id="jlb-content">
{{content}}
{{>tags}}
</section>
{{/post}}
</article>
</main>
{{! This goes in the partials folder }}
{{#get "tags" include="count.posts" order="count.posts asc"}}
<ul>
{{#foreach tags}}
{{#if count.posts}}
<li>
<a href="{{url}}">{{name}} ({{plural count.posts empty='No posts' singular='% post' plural='% posts'}})</a>
</li>
{{/if}}
{{/foreach}}
<ul>
{{/get}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment