Babilema GitHub Logo View on GitHub

This blog post is actually a GitHub issue

By Arthur Wallendorff on March 21, 2024
Last modified on March 23, 2024

Note: this article was written by GitHub Copilot based on basic info and the project readme. It is firstly intended to be part of the test and demo of Babilema on its own repo.

I’m excited to introduce Babilema, a minimalist static blog generator that turns GitHub issues into blog posts. Built in just 5 days, Babilema is a testament to the power and simplicity of Go, a language I’ve recently started exploring.

Why Babilema?

As I embarked on my journey to learn Go, I wanted to create a project that would not only help me practice the language but also provide real value. With Babilema, I aimed to create a tool that is simple, minimalist, and easy to use, while also being powerful and flexible.

A friendly robot

Babilema is designed to be used as a GitHub action, making it easy to integrate into your existing GitHub workflow. It’s also somewhat customizable, allowing you to provide your own templates for a few files. And while it’s already usable, I plan on adding more features as I use it for my developer as a service business this year.

Minimal Dependencies

One of the key design principles behind Babilema is to rely as much as possible on the standard library. This not only keeps the project lightweight but also reduces the potential for dependency-related issues.

The only external dependencies I’ve used are BurntSushi/toml for parsing TOML files, gomarkdown/markdown for parsing Markdown, and google/go-github for interacting with the GitHub API. These libraries are well-maintained and widely used, providing robust and reliable functionality.

How It Works

Babilema uses GitHub issues as the source for blog posts. Each issue should be written in Markdown with a TOML front matter, which includes metadata such as the title, slug, description, author, and tags.

When you run Babilema, it fetches the issues from your GitHub repository, parses the front matter and the Markdown content, and generates a static HTML file for each blog post. It also generates an index.html file for your blog’s homepage. In order to prevent random people to write on your blog, only admins and users with write permission on your repo will see their issues parsed and converted into blog posts.

Future Plans

While Babilema is already functional and usable, I have plans to add more features, such as support for custom scripts (JS), a “related articles” section generator, and support for custom metadata. I also plan to use goroutines to speed up the process.

Conclusion

Babilema is a simple and minimalistic static blog generator that demonstrates the power and simplicity of Go. Whether you’re looking for a way to turn GitHub issues into blog posts, or you’re interested in Go and want to see what it can do, I invite you to check out Babilema.