How to Build a Working Tag Page? #638
Unanswered
JoannaHsueh
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I've been trying to create a tag page that filters blog posts by tag, but haven’t success so far(The page is created but with no articles).
I noticed there's a file called [...page].astro under the /src/pages/[...]blog/[tag] directory in the Astrowind template, but this routing structure seems hard to be interpreted and doesn't match URLs like "/blog/tag/tag-name/page/1" very well. I also tried building a custom route (e.g. src/pages/blog/tag/[tag]/page/[page].astro), but ran into rendering conflicts or undefined props that I couldn’t resolve.
However, there's an existing working tag page (e.g. /blog/tag/astro/) on the demo site, so I assume there's an existing solution in the template. Could anyone point me to the right file or structure that powers that tag page?
I’d really appreciate any guidance! Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions