Using the terminal or command prompt (what ever you decide to call it!), navigate to the directory where you keep your projects (I keep mine in ~/www/). Then run the command below, replacing myproject with what you are going to call your project.
hugo new site myproject
You have your new project created now. But if we try and run it with this:
cd myproject && hugo serve
You’ll get this error:
WARN 2021/04/10 16:43:32 found no layout file for"HTML"for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
:( But it’s no problem, it’s just missing a theme.
We’ll need to get a theme setup, you can find many examples on the theme store. In our example, we’re going to use Anatole.
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.
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.
How to Install the Latest Version of Hugo
Ubuntu 20.04 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.
View Latest Github Releases And choose to download and install either of these (we’ve replaced the version with an X)
hugo_extended_0.X.0_Linux-64bit.deb hugo_0.X.0_Linux-64bit.deb The ’extended’ version includes SASS building, extra minfiying and resource processing.