This might be a stupid question as I am no geek in this world, in fact a total novice. As such I find the Grav doc quite daunting as it quickly plunges into vocabulary and notions that I can’t follow.
Any way getting started with my site and theme Future2021 I just wanted to change the background colour of one of the pages.
I read how to insert html into the markdown file for the page and tried it by adding html into the the portfolio.md but it fails every time and lists the markdown as text on my webpage."
I’m using
inserted in my .md file
Is there something I’m missing?
is there a list of what Grav keywords should be used in the markdown files?
This is a very common confusion when starting with Grav, so no worries
What’s happening is that inserting raw HTML into a .md file is not always the best approach for layout or styling changes like background colors. In Grav (and especially in themes like Future2021), it’s much cleaner to handle this via CSS and page-specific classes.
In your theme, there is already a mechanism prepared for this in base.html.twig:
This means you can assign custom classes to the <body> tag from each page.
Recommended approach
Add a class to your page
In your page’s .md file (or via the Admin panel → Advanced tab), add:
body_classes: custom-bg
Define the CSS
Then, in your theme’s CSS file (e.g. custom.css), add something like:
Well I did make it work by scouting around. The custom.css file I had to creat a new css directory under the Future2021 theme.
Unfortunately the background-color change is only partial, where the “content” is placed the box is all white.
I need to dig deeper clearly
Also its fairly clear that the Owl carousel as-is won’t work very well with photos in portrait format.