Moving to Hugo and a New Domain
I have long maintained a WordPress blog and rarely posted anything. In the process, I repeatedly noticed how slow WordPress actually is. Additionally, I need PHP and a database to keep everything running. This, coupled with the fact that there were recurring security vulnerabilities in WordPress, led me to search for an alternative.
Since I don’t need much dynamic content on my website, I looked for a static site generator and came across Hugo.
Hugo is an application written in Go that generates static HTML files from Markdown files and templates. I now deliver these only with an Nginx and have a beautiful blog without PHP and MySQL. Thanks to Disqus, I don’t even have to give up a comment function.
To make my life even easier, I use Gogs and Drone.io to automatically build my blog and copy it to the server. For this, I use the following .drone.yml:
build:
production:
image: publysher/hugo
commands:
- hugo --destination=<production_source>
when:
branch: master
staging:
image: publysher/hugo
commands:
- hugo --destination=<staging_source> --buildDrafts=true --buildFuture=true --baseUrl=<staging_url>
publish:
rsync:
host: <server>
user: <user>
source: <staging_source>
target: <staging_target>
recursive: true
rsync:
host: <server>
user: <user>
source: <production_source>
target: <production_target>
recursive: true
when:
branch: master
This ensures that every push to my Gogs repo triggers a build and loads a production and a staging version onto the server. It’s almost magic.
To top it all off, I have acquired a new and more personal domain. My blog will be found at https://cperrin.xyz in the future.


