jekyll-category-archive-plugin | Jekyll plugin for category archive | Plugin library
kandi X-RAY | jekyll-category-archive-plugin Summary
kandi X-RAY | jekyll-category-archive-plugin Summary
Jekyll plugin for category archive
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Renders the category .
- Serialize the content
- Collects all pages for a site .
- Gets a list of posts by category .
- Create a folder .
jekyll-category-archive-plugin Key Features
jekyll-category-archive-plugin Examples and Code Snippets
Community Discussions
Trending Discussions on jekyll-category-archive-plugin
QUESTION
I am using category-archive plugin for my Jekyll project. I want to have a category list menu for each category archive page so the user can navigate between different category archives. I would like to add class="active" to the category list link for the category archive page currently viewed. I have something similar going for the site navigation by comparing the page.url to navitem.url the difference is that for the site nav i specify the list of navitem.urls in config.yml and for the category archive the list of category names is generated based on the categories specified in the post itself, and i am having trouble using the {{ category | first }} variable within the {% if %} operator so i could either check for "==" or "contains"
This is what i have at the moment but it doesn't seem to work
...ANSWER
Answered 2017-Jan-05 at 03:03The class liquid variable is inside the for loop so when you use it outside the scope is empty, also it should be "contains" instead of == because the path contains more characters that won't be present in the category of.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jekyll-category-archive-plugin
Place the file category_archive_plugin.rb into _plugins directory of Jekyll site working directory.
Copy _layouts/category_archive.html into _layouts directory of Jekyll site working directory, then edit it appropriately.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page