In this post we’re going to have a look at how to create a simple Markdown powered blog with Go(lang) and gin. The blog will be able to look up a markdown file by title / filename, display a list of all blog posts, display a single blog post and give the user an error page when a link can not be found.
I’ve been dabbling with Go and more specifically gin again and I needed a very quick and dirty authentication for a pet project.
Typically I don’t recommend HTTP / basic auth to protect resources, but for this project I didn’t have a database and I was just serving some markdown files here and there.
gin is one of my favourite web frameworks for go, because it has a lot of really cool middlewares, it’s a bit like the express or hapi of go.