trophy-jekyll icon indicating copy to clipboard operation
trophy-jekyll copied to clipboard

How to access to category description?

Open KhanMaytok opened this issue 9 years ago • 3 comments

In _categories folder I see an html page for each category. How can I access to the description and display it on a page?

KhanMaytok avatar Dec 27 '16 00:12 KhanMaytok

I believe description data that you include in YAML front matter of a category page is used for SEO purposes only and is implemented in a few of meta tags inside _includes/head.html.

It'd be very much of Jekyll way to just implement it yourself, for example by putting <h2>{{ page.description }}</h2> in _includes/category.html, to display it on the page.

adaRn avatar Dec 27 '16 14:12 adaRn

Humm, I wanted to display the description of each category on the home page, in categories tab. Display the list of categories and its desciption.

I managed to realize this with collections, but it looks to me tatty

KhanMaytok avatar Dec 29 '16 14:12 KhanMaytok

Yeah. I didn't build the theme to have descriptions for each category on the category tab. I tried to keep the cards simple because categories really shouldn't need a description.

Link me whenever you have something built so I can take a look how you styled it up.

thomasvaeth avatar Dec 30 '16 00:12 thomasvaeth