Skip to content

Commit

Permalink
fix tag bug
Browse files Browse the repository at this point in the history
  • Loading branch information
NeroBlackstone committed May 23, 2022
1 parent afb52a7 commit ad18f14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/_includes/layouts/tag.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layout: layouts/base.njk
<section class="section">
<div class="container">
<h1 class="title">Tagged “{{ tag }}”</h1>
{% set postslist = search.pages(tag) %}
{% set postslist = search.pages("'" + tag + "'") %}
{% include "templates/postslist.njk" %}
<p>See <a href="/tags/">all tags</a>.</p>
</section>
Expand Down
1 change: 1 addition & 0 deletions src/tags.tmpl.js → src/tag.tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default function* ({ search }) {
yield {
url: `/tags/${tag}/`,
title: `Tagged “${tag}”`,
type:"tag",
tag,
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/tags.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ menu:
<div class="container">
<h1 class="title">Tags</h1>
<div class="tags are-large">
{% for tag in search.tags() %}
<a href="/tags/{{ tag }}/" class="tag is-link">{{ tag }}</a>
{% for page in search.pages("type=tag","tag") %}
<a href="{{ page.data.url }}" class="tag is-link">{{ page.data.tag }}</a>
{% endfor %}
</div>
</div>
Expand Down

0 comments on commit ad18f14

Please sign in to comment.