Published on 2020-05-24
Edited on 2024-04-09
Categories:
tech
Tags:
blogging
100DaysToOffload
In this second post, I’ll go over my thought process to create / publish a blog using markup languages and couple of tools.
The objective of my setup was to be done quickly so I can write something else than software configuration :)
My hopes for my blogging setup:
Spoiler alert: it’s possible to get up and running in one day, if you accept some compromise and don’t get stuck on trying to make everything perfect.
Disclaimer: There are much easier way to get started using platforms like Wordpress or write.as. This solution is tailored to what I’m comfortable doing, it may not be the right solution for you.
Disclaimer2: This is not a howto guide, but hopefully source of inspiration.
Couple of options I’ve looked at:
Followed the Hugo getting started and got a two dummy post created.
This is really easy to get started. Here are the main steps:
That’s all you need to get started.
I really like clean and simple. Now there are many nice clean/simple theme on Hugo site, but the ones I liked had big CSS and many even made use of JavaScript. Also, none made use of simpler elements defined in HTML5.
What I was looking for was in the spirit the opinionated thebestmotherfuckingwebsite.
Found this now unmaintained Hugo theme: https://github.com/mpcsh/hugo-theme-motherfuckingwebsite
Made my own version to be able to make it work:
The templates and CSS are quite simple but not HTML5.
At this point, it’s good enough visually, on my laptop… No time to waste, next step!
Some hope for deployment:
Couple of options comes to mind:
Here, my objective is to get it done ASAP. so no A/B comparison of which on is best. The first hit that seems to work is king :).
Search string from the first thing that comes to my mind: hugo publish netlify github First hit: Host on Netlify | Hugo
That’s it, I have my solution :)
Followed the guide, starting with the dummy site above. I ended up swapping it with this a new github repository benoitj/blog.benoitj.ca: my blog sources.
Now each time I push new changes, I can see it on the generated netlify domain.
Now, lets get a custom domain setup.
I already own one, so after a bit of research found the Netlify guide to Configure external DNS for a custom domain | Netlify Docs
Finding the doc was the hardest part, Netlify appears to sell domains in addition to website hosting. So the first few guides are over setting up Netlify DNS.
If you are in the same situation, you will have to setup a CNAME pointing to the Netlify domain name assigned to you. Don’t forget this will take time for the DNS entry to propagate over the Internet and work (from minutes to hours).
Someone spotted a broken link in my about page. Turns out the default version of Hugo used on Netlify does not properly support org-mode.
I updated with success the ENVIRONMENT variable HUGO_VERSION to 0.71.1 and it did fix the issue.
I ended up creating a netlify.toml in my site root to control the Netlify build.
Here is the minimum setup in netlify.toml:
|
|
It’s now possible to enable checklinks plugin on netlify.
Since I already have a netlify.toml config to control the build, it’s just a matter of adding this to it:
|
|
Here is my unsorted list of things I may improve:
I did managed to get out of the software / technology faster than I thought.
The danger for me was to spend all my time customizing tools and not writing a single post. I would have learned something for sure, but missed other learning opportunities.
I hope others can find this helpful.
I’m thinking, if I reach 10 posts in the next 2 months, I’ll be on the right track :)
This is day 2 of my #100DaysToOffload. You can read more about the challenge here: https://100daystooffload.com.
For comments, use email or Mastodon
Don't forget to subscribe to my RSS feed!