Post Order on tag/{slug} page

I would like to display my posts in order from oldest to newest. I found this Ghost tutorial. However, it is not working. I think it is because I am trying to order posts on the tag/{slug} page. When I add the following line to the taxonomies section of the routes.yaml file - order: published_at asc and then I upload to Ghost Admin > Labs I get an error message that says:

The following definition "order" is invalid: Unknown taxonomy.


I also tried this in my tag-part-one.hbs file without any luck:

{{!< default}}

<div class="page-width">
    {{#tag}}
        <div>
            <h1>{{ name }}</h1>
        </div>
    {{/tag}}

    <div class="posts">
        {{#foreach posts filter="published_at asc"}}
            <a href="{{url absolute="true"}}">
                {{title}}
            </a>
        {{/foreach}}
    </div>
</div>

I found this post, which I think the author is asking the same thing as me but there was no reply. So, I am trying with my own post.

How should I go about ordering posts on my tag/{slug} page?

It is a bit hacky but I ended up just tweaking the publish dates of the posts to get them in the order I needed…

1 Like