Body Class

I’m needing to add a class to the body tag based on what page is currently active. Can this be done with Grav?

I need help with this too, specially how to capture he header title as body class

figured it out, change:

to in base.html.twig

Another option: You can keep body___class in the base.html.twig and add body_class: class-name to the front-matter of any markdown page you wish to target with body class css.

Your source html wiill output: <body class="class-name">

Yup, just depends on whether or not the theme you are using has that body_class being output in the body tag. There are no theme requirements as such for Grav, you can do whatever you like, themes that used Antimatter as a starting point, probably have that, but if not, it’s simple enough to add.