ruby - Creating categories on Jekyll driven site -


i'm having hard time understanding how generate archive pages each category use on blog. i'd user able click on category , taken page lists out articles desired category assigned.

the way can think of doing manually creating specific html file each category in root. i'm sure there must more dynamic way?

i have site hosted on github - https://github.com/sirbrad/sirbrad.github.com

thanks in advance!

brad

you can generate list of available categories using site.categories data, using first element of each category (which array) category name:

{% cat in site.categories %}     <li>{{ cat[0] }}</li> {% endfor %} 

and can generate list of posts in given category so:

{% post in site.categories.category_name %} 

it doesn't seem possible generate individual html page each category hoping, perhaps compromise generate single page containing list of categories, each category contains posts in category. use simple javascript hide posts in each category until category name selected, giving same user experience individual archive pages each category.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -