sbruder / spectral

Port of html5up’s spectral theme to hugo
Other
63 stars 42 forks source link

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

Open martindonat opened 8 months ago

martindonat commented 8 months ago

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
site template freebie
crafted by HTML5 UP.
Ported to Hugo 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 commented 7 months ago

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 commented 5 months ago

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