This is our very first post on MakeWithHugo.com - where we are going to make tutorials on how to create, work with and adapt websites built with Hugo.
A Bit of Background
Hugo is a static site generator built in Go. It is fast and extendable and a good choice for building a static (html-based sites). It does, however, have some nuances that requiring some research as they’re not immediately obvious. This is what we’re trying to help with.
Edd is a PHP and Go developer who enjoys blogging about his experiences, mostly about creating and coding new things he's working on and is a big beliver in open-source and Linux.
Deploy a Hugo site to Netlify
–
Netlify is a convenient hosting platform for staticly built sites, like those built with Hugo, as it offers fast and cheap delivery of HTML files. In this tutorial, we will quickly run through how you can take your site from your local computer and push it out to the world-wide web.
Make a Static Page in Hugo
–
Hugo is built with blogs in mind, and as such the pages you create will often show in the loop of blog posts. But there are times when you want to create pages - which aren’t posts - and you don’t want them to show unless you link to them. We recently came across this scenario when trying to add a privacy policy page.
Here’s our solution to the problem (using the privacy policy as an example).
Add Search To A Hugo Site
–
As with many sites these days, once they get beyond a certain size then search becomes an essential part of them. It can however, be one of the trickier parts of a statically built website because without a back-end to do the search for you, it has to be done client-side in the web browser using JavaScript.
Luckily, solutions to this problem already exist and we show off one these solutions below which uses both FuseJS and MarkJS.