My Jekyll website has two kinds of content: personal, and professional.
I would like to emphasize which kind of content a visitor is currently reading with dynamic CSS classes:
- If the visitor is on a page tagged as "personal", my
<main>
element's class should be"personal-content"
. - If the visitor is on a page tagged as "professional", my
<main>
element's class should be"professional-content"
. - Otherwise, the class should be
"site-content"
.
In the front-matter of each page, I'm creating an output statement that I set either at "personal"
or "professional"
, for example:
---
content: "personal"
----
Then I'm using this output statement in my tag like this: (indented for reading purposes)
<main
{% if page.content %}
class="{{ page.content }}-content"
{% else %}
class="site-content"
{% endif %}
>
However I'm only seeing styling from my site-content
class. What did I do wrong?