-
I'm hoping this is just me being rusty with my Jekyll/liquid stuff, but I'm also wondering if it's just that we've really accumulated some "history" in this repo. We set this up long ago and now that it's worked for so long, I find myself struggling again with liquid. We are wanting to create a page like this one: We're using Github pages, and our repo and my most recent attempt is here: I can get the above pages to render, but they don't have any tagged pages actually ON them. We aren't using a |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
This right here is the issue. Jekyll only supports "site wide" tags on documents in You can look through some old issues on jekyll/jekyll where this issue was raised. There have been talks over the years to harmonize posts, pages, collections, so the behavior of |
Beta Was this translation helpful? Give feedback.
-
oooof. I was afraid of that. Sigh. So, can you imagine a way to add front matter metadata to pages in collections and then collect, over all collections, tagged pages and make links to them? Basically I want the structure of the collections to organize the pages, but then make little "cheat sheets" that are lists of pages to go to that have a specific tag (or something like a tag) on them. Is there another approach that mimics this? |
Beta Was this translation helpful? Give feedback.
-
Since tags are only supported on posts, I never tried adding them to collections or pages. For pages:
For a collection (replace
If these return document data, then you could modify my post tags template to loop over You might want to search through the Jekyll Talk forum as I know I've seen others wanting to do the same. Just don't think there was a solution until Jekyll core did something to make |
Beta Was this translation helpful? Give feedback.
-
Closing as this an upstream issue. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the tidbit there. From what I can manage to wrangle, I can get the I'm not sure (again, liquid/jekyll/ruby rookie), how to loop over all the collections, find any pages with a specific tag, and then show those page url's as if it was on your We'll be manually creating tags and there won't be many. So we can make a markdown for each of the tags to be a landing page for this. On that markdown, I can't figure out how to do it, but I need to loop through all the collections on the site ( |
Beta Was this translation helpful? Give feedback.
-
Yeah I dunno. Jekyll Talk or Stackoverflow are your best bet at this point. The fact that I see this use case come up so often tells me no one has a good solution for it so you might be out of luck. I also just went with posts and used
|
Beta Was this translation helpful? Give feedback.
This right here is the issue. Jekyll only supports "site wide" tags on documents in
_posts/
. You can add tags to pages and collections, but they won't be part of thesite.tags
object used to generate the tag indexes.You can look through some old issues on jekyll/jekyll where this issue was raised. There have been talks over the years to harmonize posts, pages, collections, so the behavior of
categories
andtags
are consistent between... but to my knowledge there's be no movement on that front.