Overview

One of the biggest concerns I had with using Blogger was the lack of a good client for dealing with markdown files. Fortunately, EasyBlogger solved this issue. However, since the last valid commit for EasyBlogger was 5 years ago, I encountered some issues while using it and decided to dockerize it.

Authorization

Generating the authorization URL

To use Blogger, the first step is to fetch your credentials. You can find your blog ID once you log in to Blogger - it’s the last part of the URL path. For example, in my case, https://www.blogger.com/blog/posts/8010633675189262826 the ${blogid} is 8010633675189262826.

Next, run the following command:

docker run -a stdout -t --rm --name easyblogger -v ${localdir}:/root/ murmursdev/easyblogger --blogid ${blogid} -v DEBUG get

Here’s what the command does:

  • -a stdout: Shows the Docker output in your host’s output
  • -t: Shows debug information (required)
  • -v ${localdir}:/root/: Stores the credentials to your host

After running the command, you’ll get an authorization URL like this:

https://accounts.google.com/o/oauth2/v2/auth?client_id=132424086208.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fblogger&access_type=offline&response_type=code

Authorization

Click or copy the Google URL to your browser, then finish authorization. You’ll get a callback URL like this:

http://localhost:8080/?code=4/0AVHEtKTa_TfgiI8Iw&scope=https://www.googleapis.com/auth/blogger

Since the server is running in Docker, you need to notify EasyBlogger using the following command:

docker exec easyblogger curl ${callbackUrl}`

Using EasyBlogger

Once you have your credentials, you can call EasyBlogger with the following command:

docker run -a stdout -t --rm --name easyblogger -v ${localdir}:/root/ murmursdev/easyblogger

For more information on how to use EasyBlogger, please refer to the documentation.