For Debian-based linux distributions, it’s often easiest to pick up the latest copy over on the Hugo github (under Releases). One reason for this is how quickly new versions come out, the versions inside package managers can become out-dated quickly.
And choose to download and install either of these (we’ve replaced the version with an X)
The ’extended’ version includes SASS building, extra minfiying and resource processing.
Or, the other way:
sudo apt install hugo
Either of these ways should be enough to get you setup, so that if you type:
$ hugo version
Hugo Static Site Generator v0.80.0-792EF0F4/extended linux/amd64 BuildDate: ...
…then you can see the current version running.
The only other setup required is the either setup your new project, or navigate to your existing site and run the hugo command.
Updating Hugo should be very similar to installing. If you downloaded a .deb file, download the new one and install it. If you installed through a package manager, like apt, your limited by their version, but running apt update && apt upgrade would update to the latest.
Migrate Wordpress to Hugo
Wordpress is a fantastically popular blogging platform, but judging by the fact you are here, you’re looking to move to Hugo (great choice!)
The software we’ve used in the past to do this for us is called wordpress-to-hugo-exporter (does as it’s name suggests). This will essentially convert the database posts saved into markdown files which you can use in Hugo and with your theme of choice.
View on Github How to It’s important to note this works as a Wordpress plugin, so if you can’t install plugins it may not work for you.
Add a Last Edited Date to Posts
With frequently changing information it can be useful to record both when a post was created and when it was last updated - showing that it’s been reviewed recently. We do this on this site by showing the created date and showing the last modified date if it’s different from the created date (see above the title).
There’s two ways of doing this in Hugo:
recording when you last changed it using the last changed date in Git (if you use it) (or a blend of the two)
Create a New Hugo Project
You’ve got your great new idea! Now how to get started? If you’re using Hugo as the tool to build your website then this post should be for you.
We’ll be looking at how to create a new basic project and the first few tasks on a clean new site.
You’ll need Hugo installed first, if you don’t then take a look at our guide on installing it.
1. To Begin Using the terminal or command prompt (what ever you decide to call it!