Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I set a background image for the title? #33

Open
martindonat opened this issue Nov 8, 2023 · 2 comments
Open

How do I set a background image for the title? #33

martindonat opened this issue Nov 8, 2023 · 2 comments

Comments

@martindonat
Copy link

Hi,
thanks for the great template. I was however not able to set an image as background for the title. I had a look into the source code of kegelschiene.net. The background image is image/banner.jpg. I couldn't find it in the config.toml. How is it set as background?

By the way: I thought the background image is set here in the config.toml (copied from exampleSite), last line:

[params] fancyTitle = "Spectral" # title for frontpage, may include image copyright = "John Doe" description = 'Another fine responsive<br />site template freebie<br />crafted by <a href="http://html5up.net">HTML5 UP</a>.<br />Ported to <a href="//gohugo.io">Hugo</a> by Simon Bruder.' startbuttonText = "Activate" startbuttonLink = "#" body_is_markdown = true #custom_css = "foo.css" #custom_sass = "bar.scss" #images = ["path_to_social_image_for_link_previews.jpg"]

...but nothing happened.

@laksith19
Copy link

Not sure if it still helps but you simply need to place your desired image at <project-root>/static/images/banner.jpg and the theme will render it as the background for the title

@mansoorbarri
Copy link

mansoorbarri commented Feb 8, 2024

you can add it in config.toml on this line:
#images = ["path_to_social_image_for_link_previews.jpg"]

but remove "#" and it should work. For example, if your image is named "bg.png" in /static:

images = ["/bg.png"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants