Hello! I wanted to create a page where the user can see all existing tags in my site. So I read the following docs Ghost Themes - Dynamic URLs & Routing .
Hovewer, in my case the things not worked. Im using ghost 5.98.1 btw. Also, I’m working with a custom theme that is based on Attila.
Details:
I rewrote my route.yml
as follows:
routes:
/tags/:
permalink: /tags/
template: all-tags
collections:
/:
permalink: /{slug}/
template: index
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
I’m getting 404, when I navigate to /tags/.
My all-tags.hbs:
{{!< default}}
{{#get "tags" limit="all"}}
<ul class="tags">
{{#foreach tags}}
<li>
<a href="{{url}}">{{name}}</a>
</li>
{{/foreach}}
</ul>
{{/get}}
What I tried and made difference:
route.yml:
routes:
collections:
/:
permalink: /{slug}/
template: index
/tags/:
permalink: /tags/
template: all-tags
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
However the layout was broken, the output completely overlapped the navigation section and in the browser my site name was the following: My site (Page 1). I don’t know what’s the reason behind it.
I would appreciate any help.