Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

How to have the same Hero image on all pages (Quark blog theme)

first-time theme

Started by Matthieu 6 years ago · 1 replies · 1629 views
6 years ago

Hi,
I am creating a blog using Grav, and I decided to start from the Quark theme blog skeleton. I would like to have the same image as hero on all pages, but I cannot find to do it simply as the hero_image option must reference an image in the current folder (and I do not want to duplicate the same image in all folders). How can I do that without editing the template directly ?

Another quick question, where is the hero height defined so that I can reduce it ?

Thank you in advance !

6 years ago

@matteo,

How can I do that without editing the template directly ?

The template takes the value for the hero_image from the frontmatter of the page.

If you want the template to pick that value from somewhere else (e.g. user/config/themes/quark.yaml) and the images reside in a different folder (e.g. pages/images) you will have to change the templates.

Another quick question, where is the hero height defined so that I can reduce it ?

The height of the image, or the required height of the element <img> displaying the image?

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by MarkP, 2 weeks ago
3 193 2 weeks ago
Themes & Styling · by TomW, 2 weeks ago
0 111 2 weeks ago
Themes & Styling · by themetman, 3 weeks ago
1 206 3 weeks ago
Themes & Styling · by AH, 1 month ago
1 324 3 weeks ago
Themes & Styling · by Bruno, 4 years ago
6 1523 3 weeks ago