ARTICLE AD BOX
Okay so pretty much what the title says.
I would like to be able to set my website so that all posts are sorted in alphabetical order. However, I also have these posts separated by tags, so basically if you click a tag it will only show you the posts containing that tag.
Is there a way to do this globally without having to set extra steps to filter per tag? This is my current setup for this (which has all posts show up on every tag category, but does have them sorted alphabetically):
eleventyConfig.addCollection("postsAscending", (collection) => collection.getFilteredByGlob("gallery/*.md", "blog/*.md").sort((a, b) => { if (a.data.title > b.data.title) return -1; else if (a.data.title < b.data.title) return 1; else return 0; }) );And some important info you might need to help with the problem:
As shown above, I'm using 11ty.
I am also using Liquid to set up templates, so there is a specific template for the posts per tag if I need to share it at some point.
Thanks in advance!!
