My Nth first blog post
This is the Nth first blog post for my (new) blog. My requirements for blogging are simple, I just care about writing and I don’t really want to waste a lot of time typing commands to create the blog, to format it, or publish it…or any of that.
In the past I have tried several solutions such as:
- Medium – I liked it because it pretty much meet my requirements, I was just concern about writing. Sure if you have to write some code samples it is not the best experience but 🤷 . My main issue with Medium and why I moved away from it it is that I don’t really like their business model
- Host my own blog – tried different things and the closest I got to settle on was using GitHub pages in combination with Hugo. I liked it but the main friction point was it has some ceremony to setup and publish the blog post. And when some time passed between posts, I had just forgotten all about that process.
Recently I stumbled upon this fantastic repo. Which gave me all I wanted when it comes to blogging, easy one-off setup and then just concern about writing. And wait for it, your blog posts are a GitHub issue 🤯
How does it work?
- Your repository pretty much hosts a GitHub action (GHA) and a config.toml file to configure the Hugo static site generator
- Every time an issue is created, the GHA will create a new blog post
- The html site will be created under the gh-pages branch
How to setup?
- Clone this repo
- Delete the content/posts directory and modify the content/about.md file to say something about you
- Modify whatever you want from config.toml
- In .github/workflows/gh-on-issue.yml
- In the create content step, use your GitHub username in the IF statement
- In the create content step, use your username/repo in the line that executes the hugo command
How to create a post? Just open an issue, start writing, and submit it. GHA will kick in and will create your html static site. One last thing, after the GHA succeeds, go to your repo settings -> pages and in Source, select the gh-pages branch and save. After some minutes your site will be ready under your GitHub pages.
Contributions
- Ensure that only issues created by my user will generate a new post.
- Use the date the issue was created on as post creation date.