Unable to display hero image #2633
-
I am unable to get minimal mistakes to display the hero image. Here is the relevant sections of my _config.yml
I am using the default home.html. The output can be seen at blog.inflection.com. Inspector in chrome does not issue a call for the hero image. I assume I have somehow misconfigured the theme. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
The header image should be specified in page, not site. |
Beta Was this translation helpful? Give feedback.
-
If you want to apply that header to multiple posts you can include it in the defaults you have above. For example to have it show on all posts... defaults:
# _posts
- scope:
path: ""
type: posts
values:
layout: single
header:
image: "/assets/images/inflection-logo.jpg"
author_profile: true
read_time: true
share: true
related: true
comments: true |
Beta Was this translation helpful? Give feedback.
-
Thank you. Just to clarify: by page, do you mean home.html in _layouts? If not, could you just point me to the right section in the document? |
Beta Was this translation helpful? Give feedback.
-
By page I mean the front matter on each document (Markdown or HTML). Check the Jekyll docs on this: https://jekyllrb.com/docs/front-matter/ You should have something like this at the very top of your source file (e.g. ---
header:
image: /assets/images/inflection-logo.jpg
--- |
Beta Was this translation helpful? Give feedback.
-
Thank you, that resolves my problem! I'll submit a PR for the documentation which is not completely clear on this point - https://mmistakes.github.io/minimal-mistakes/docs/configuration/ seems to imply that header: is in _config.yml. |
Beta Was this translation helpful? Give feedback.
-
I'd rather say it's with your understanding. The documentation clearly says:
|
Beta Was this translation helpful? Give feedback.
By page I mean the front matter on each document (Markdown or HTML).
Check the Jekyll docs on this: https://jekyllrb.com/docs/front-matter/
You should have something like this at the very top of your source file (e.g.
example.md
):