From the course: Learning Static Site Building with Hugo

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Add static content

Add static content

From the course: Learning Static Site Building with Hugo

Start my 1-month free trial

Add static content

- [Instructor] Hugo makes it easy to deal with other static content like images and style sheets as well. The project structure includes a folder called static. Any files placed in this static folder are automatically copied to the output site. Let's replace the banner image that came with the theme with our own custom image. Inside of the static folder, I'm going to create a new folder called image or img. You don't have to do this, but it helps keep things organized. Now I'm going to grab a file that I have on my computer and copy it into the image folder. The config file controls which image is loaded into that banner. We can change the header_background property to img/coffee.jpg. And then start up the Hugo server if it's not running already and refresh the preview. So there's our custom banner image. Just so you're aware, sometimes content like images aren't automatically updated due to browser caching. You can save yourself some frustration and make sure changes are always shown…

Contents