I’m trying to make a page that lists out all tags (preferably those with posts) inside a new url.
This will be at domain.com/tags/
My routes.yaml is at follows:
routes:
/signup/: members/signup
/signin/: members/signin
/account/: members/account
/tags/: tags
collections:
/:
permalink: /{slug}/
template: index
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
This should (theoratically) load in tags.hbs file which I have in the theme’s root folder beside routes.yaml.
My tags.hbs file is as follows:
{{!< default}}
<header class="site-header">
<div class="outer site-nav-main">
<div class="inner">
{{> "site-nav"}}
</div>
</div>
</header>
<main id="site-main" class="site-main outer" role="main">
<div class="inner">
<header class="post-full-header">
<h1 class="post-full-title">{{ title }}</h1>
</header>
{{#get "tags" limit="all"}}
{{#foreach tags}}
<a href="{{ url }}">
<h2>
{{ name }} <small>({{ count.posts }})</small>
</h2>
</a>
{{/foreach}}
{{/get}}
</div>
</main>
This allows me to get all the tags, I think. After zipping the theme up and uploading via the admin interface however, I’m greeted with a 404 page not found when navigating to domain.com/tags/.
Note that I do not have a self-created page called Tags with the url /tags/ through the pages tab in the admin interface.
Any help would be appreciated! Thank you!