Faster Blogging: A Developer's Dream Setup

Sharing our journey of transforming glee from Python to Golang.

Faster Blogging: A Developer's Dream Setup

glee our dev friendly blogging setup has been undergoing a huge transformation for the last few weeks. For those who don't know, glee is a simple open source CLI tool that converts markdown posts into ghost blog posts.
Check out the glee demo video when you have a moment!
glee: Dev-friendly Blogging Setup

glee is one of the top open source products in the product hunt in the month of October 2023. glee was in the top 5 and got the product of the day award with 153 upvotes from worldwide.


glee Drawbacks

glee is rich in blogging features but has some drawbacks. One of the main drawbacks is its compatibility with multiple operating systems and system architectures. We lost one potential customer due to glee incompatibility in macOS.
Another major issue is the deployment time. We built the first version of glee entirely in Python and used nuitka, nuitka compiles Python programs into a single executable binary file. We need to create three separate stages for creating executable binaries for Windows, Mac, and Linux in deployment, and it takes around 20 minutes to complete.

From Python to Golang

Based on insights and learnings from building our other Open source CLI tool called Lama2, an API Client Manager that is completely built upon Golang and has better compatibility for various OS and OS architectures, we decided to move the glee code from Python to Golang. It is a little challenging because we used different Python libraries for processing tasks, and our goal is to make sure that when we switch to Golang, glee's features still work well and offer an improved user experience.

1 powerful reason a day nudging you to read
so that you can read more, and level up in life.

Sent throughout the year. Absolutely FREE.

Challenges in Golang

We encountered various challenges in migrating glee from Python to Golang. Some of them are:


glee depends on various libraries for processing the markdown file, extracting images from the markdown file, checking for duplicate images, and supporting various markdown extensions such as images, code highlights, tables, code fencing, etc.

After some research, we found goldmark, which has 3.2k stars on GitHub, is more suitable for glee for processing the markdown file. It provides most of the necessary extensions that we need.
One plus point is the goldmark-highlighting extension, which uses the chroma syntax highlighter that supports 50+ highlighting styles.

Another Python library that we used before was BeautifulSoap. We used it for scraping the image tag from HTML and replacing the image path with the image stored in the ghost database or AWS S3. In Golang, we chose an alternative way we parsed the HTML into an html parse tree using the package. Then, recursively, travel through the tree and replace every image src.

Addressing the Compatibility Issue

Compatibility with multiple operating systems and architectures is another major problem in older Python versions of glee.In golang We using wangyoucao577/go-release-action  Github workflow action for creating different go binaries for different OS and architectures and pushing them to github release assets. We used the same for deploying our Open source API client manager, Lama2.

Future Changes

There are a lot of opportunities hidden in glee. Currently, glee is a supporting tool for the Ghost Blog platform. But there is a possibility to convert glee into a completely dev friendly independent content management system. If you have an idea in mind or a feature for glee I'm inviting you to contribute to our platform. If you are a continuous writer or you are planning to start a new blogging setup, I'm sure glee will reduce your efforts a lot.

Read more about glee here.

FeedZap: Read 2X Books This Year

FeedZap helps you consume your books through a healthy, snackable feed, so that you can read more with less time, effort and energy.