Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Referencing `current_page.data.layout` in an IF Statement #1965
Trying to reference the layout of the current page does not work:
However, trying to do the same on a separate item of frontmatter does:
Sorry for the late reply.
It is indeed 'alt_layout' when I do
I'm still a bit of a Ruby newb, is 'layout' something special? if I write
I'm also experiencing this issue.
Trying the following does not work:
- unless current_page.data.layout == "my-layout" // does not work
However checking another frontmatter variable does work:
- unless current_page.data.body_class == "my-body-class" // works
For context, using