Bids
Bids

Reputation: 73

Use Categories/Tags in non-Post pages too

I have been searching for a way to use the tagging feature available in jekyll Posts, but in any page on the site, not just in pages contained inside the _posts directory.

As far as I can tell, when I specify a tags value in the YAML front matter of a page that is not in _posts, these tags are then accessible from the page.tags variable, but not from site.tags, which makes it hard then to have a separate tags.html page summarizing all tags from all pages.

Any idea how to deal with that?

Upvotes: 1

Views: 373

Answers (1)

Bids
Bids

Reputation: 73

Ok, so it seems that there is no built-in way to leverage tags from pages, so in case someone stumbles upon this thread, I finally rolled my own jekyll plugin code to do it, based on this great blog entry, with very little modifications:

http://brizzled.clapper.org/blog/2010/12/20/some-jekyll-hacks/

Upvotes: 1

Related Questions