Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

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

first-time theme

Started by Matthieu 6 years ago · 1 replies · 1511 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 FrViPofm, 4 weeks ago
4 485 3 weeks ago
Themes & Styling · by johan thomas, 5 years ago
1 810 3 weeks ago
Themes & Styling · by stuart young, 2 months ago
3 669 2 months ago
Themes & Styling · by Sebadamus, 3 months ago
5 688 2 months ago
Themes & Styling · by martynfoster735, 3 months ago
1 651 3 months ago