spectral icon indicating copy to clipboard operation
spectral copied to clipboard

How do I set a background image for the title?

Open martindonat opened this issue 1 year ago • 2 comments

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.

martindonat avatar Nov 08 '23 12:11 martindonat

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

laksith19 avatar Dec 23 '23 05:12 laksith19

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"]

mansoorbarri avatar Feb 08 '24 11:02 mansoorbarri