Hugo on Digital Ocean
I’ve followed the steps in the Digital Ocean’s guide. It was mostly straightforward modulo a few issues:
-
I initially got a “no component detected” error when trying Step 4. After looking more deeply at how DO actually deploys Hugo Apps I found the issue. Digital Ocean’s deployment setup expects to see a
config.toml
file in the root directory, while newer versions of Hugo create ahugo.toml
by default, as per the documentation. Renaming my config file fromhugo.toml
toconfig.toml
fixed the problem. -
The theme I used wasn’t displayed properly (or at all). That was because the
baseURL
was misconfigured. I set it tobaseURL = ''
and it fixed the issue. -
This is a squarespace-specific issue: pointing my domain was not as straightforward as it would have been wiht other registrar. Indeed, rather than asking only for only the names of nameservers to use – like virtually every registrar on the list – they ask for extra information like record type, and actual IP address. Since DO doesn’t provide that info, it means that you basically have to know what you’re doing (does DO keep stable IPs or do they change regularly? etc..). I’ve checked the accepted answer to this thread from 2017 and verified that the current IPs for DO are the same as they were then (
ping -c1 ns1.digitalocean.com
). The whole process did seem more complicated and painful than it needed to be.
Edit: it looks like squarespace does have an option for only adding nameservers. Rather than click the DNS tab (as indicated by the doc) you can click Nameserver Settings under Advanced Settings.