This is an experiment to publish near-realtime thoughts and ideas with a lower “polish” bar than blog posts. I see this as analogous to Twitter or short-form/ephemeral social media content, but on my personal website.

The intended workflow is:

  1. Have a thought or idea, want to publish it
  2. Open terminal, type fd <short title>
  3. Edit as a Jekyll/markdown blog post
  4. Push it

Here’s the bash function I wrote for this, sourced in my .bashrc:

fd(){
    local N=$(date '+%Y-%m-%d')
    local TITLE=$@
    local TITLE_LOWER=$(echo $TITLE | tr 'A-Z' 'a-z')
    local TITLE_SLUG="$N-${TITLE_LOWER//[ ]/-}"
    local HEADER="---\ntitle: $TITLE\nauthor: Mitch Rees-Jones\ndate: $N\ntags: ['feed']\n---\n\n"
    local FEED_FILE="/Users/reesjones/cs/website/content/feed/$TITLE_SLUG.md"
    echo $HEADER > $FEED_FILE
    vim $FEED_FILE
}