Make with Hugo Logo

Make with Hugo

Tutorials for the Popular Static Site Generator Hugo
  • All
  • Tutorials
  • Shortcodes
  • About

Syntax Highlighting with Hugo (without JS)

If you are into writing code and use Hugo for building a personal or tech blog - then you’ll want syntax highlighting setup for when you show off your code snippets (like we do on this site!) It is also quite simple when you know how. Some advantages of using this method include not having to download a JS library to do the job (so performance), not having the code flash on load after the JS finishes and not having to manage another library to do a job that’s already included in Hugo.

#syntax #code #highlight #block #design #theme #chroma

Check If a Page Is the Home Page

Check If a Page Is the Home Page

When writing and changing Hugo templates you will often want to act differently based on whether the page you are looking at is the home page, or any other page. So the post pages, contact, about etc won’t have this content show.

#home #html #show #hide #template #logic #if

Only Show HTML When on Local/Production

Only Show HTML When on Local/Production

For Hugo Themes, you will sometimes want to act differently between you working on the site, developing it, and the site if it’s running publicly on the internet. One example of this is if you show advertisements - you don’t want them showing on local (and contributing to impressions) but you would want to show them to the world. The reverse is also true, you could load scripts like livereload only on local development, through hugo server.

#if #template #theme #local #production #ads #code #html

Hello world! Welcome to MakeWithHugo.com

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.

#welcome #hugo #static #generation #deploy #make #learn
←  Previous Page { 4 }
Privacy Policy
Site illustrations (of Hugo the rabbit) drawn by Carina Roberts.
Tutorials & Site Content © 2026 Make with Hugo
Code Licenced under MIT Licence
Make with Hugo Logo