My Jekyll Workflow

Posted on: 26th March 2021

Cumbersome. That’s how I would describe my previous workflow to write a post. It involved going to my blog post folder, copying the latest markdown file to make a new file, and editing the new file with new content. Just to avoid dealing with the liquid template on top of the post. Ugh. Last week I found this bash script by @joeligj12. A quick edit to format multiple tags, removing extra liquid content that’s not used in my blog, setting the layout to ‘post’ as default, binding $mod+J to the script in Sway config and the script was ready for business. I tend to keep the markdown file name and the post title same so fixed the script to have one less dialog. This is how my modified script looks like:

#! /bin/bash 

name=$(rofi -l 0 -width 40 -p "Filename (ESC to quit):" -dmenu)

if [ -z $name ]; then

# replace all blanks with -
file=${name// /-}

today=$(date +"%Y-%m-%d")
tags=$(rofi -l 0 -width 45 -p "Tags:" -dmenu)

while [ $num = 0 ]; do

	choice=$(echo -e "Edit file\nEdit title\nEdit tags\nCancel" | rofi -width 15 -l 5-p "Now?:" -dmenu)

	if [[ $choice = "Edit file" ]]; then
  	touch $path/$
  	echo -e "---\ntitle: $title \ntags: $tags \nlayout: post \ndate: \"$today $(date +"%T") -0600\" \n--- ">> $path/$
		kitty -e nvim $path/$ & disown
	elif [[ $choice = "Edit title" ]]; then
		title=$(rofi -l 0 -width 50 -p "Title:" -dmenu)
	elif [[ $choice = "Edit tags" ]]; then 
		tags=$(rofi -l 0 -width 45 -p "Tags:" -dmenu)

This removes a considerable friction in writing a new post.

For fans of GUI and CMS style content management, I found this plugin called jekyll-admin. Test driving it wasn’t a pleasant experience and the UI was a little buggy. I am not sure if it was my browser or the plugin but I ended up ditching it. Your mileage may vary.

Day 97 - Join Me in #100DaysToOffload

tags: 100daystooffload jekyll