A mistake noted in this site. Running it for the first time, lead me to realizing that, as always, there are too much things that I don’t know and things to learn.
As said, this site is more an hobby, a playground, than something useful. Btw who cares?
I use Hugo, you see? In the configuration file
config.toml, there is an option called
baseURL pointing by default to localhost:1313, useful for testing the site before deploying it on the hosting server.
Using this command, you can point the browser to http://localhost:1313 and look at the results as you add posts or changes.
hugo server -wDs ./ -d dev -v --verboseLog --debug
Once satisfied, you can deploy the generated static pages using for instance rsync. The result is that many pages in the production server point to localhost:1313. To avoid that, and use the right, the destination
baseURL you can specify it in the command line before copying the files to the destination:
hugo --baseURL "https://www.yoursite.xyz" && rsync -avz --delete public/ -e "ssh -i ~/.ssh/id_rsa" email@example.com:/var/www/hugosite