Hey here, does anyone know how to tell when you’re on a collection page?
{%- if page.layout -%}
{%- assign class = page.layout -%}
{%- endif -%}
<html lang="en" class="is-{{ class }}">
So, I have that, with which I can have a unique class for every unique page, right. Now, I have a couple collections and I wanna be able to assign and use a class of is-archive when I’m on the collection reel, but is-single when I’m on the single page from a collection. Understood?
Reel, I just meant archive, meaning the page used to render/show all the posts belonging in a collection. Say you have a posts collection. How do you tell with Jekyll/Liquid when you’re on a page, a blog page, for example…I’m not sure there’s any variable to do so…