I have problems sharing
I’ve always been a very shy person and not very good in new social situations, though over the years I’ve become better at this. I’ve (mostly) managed to hide this side by “faking it until you make it” but this anxiety still creeps through in other ways. Ways that are, or were, reflected in the design of this site. For example, there was no index page listing all my posts and each URL contained a unique sha1sum of gibberish making it nearly impossible to find a post without knowledge of the URL.
Hell, one reason I haven’t written much lately is because some of my previous posts received a lot of attention and I didn’t really want the extra scrutiny. Just because I put something online doesn’t mean it’s for everyone, especially not hacker news. Sometimes a man just wants to yell at a cloud and not have it yell back.
When I started to open up my blog to more people I wanted a way to restrict some of my previous writings, as they were not for a wider audience, but lacked a good way to do this. I’d written chrome extension a few years back which used some client side encryption/decryption which gave me the idea to just encrypt the blog posts I want to keep semi-private and share the key with whoever should read it.
Since I use Jekyll to power my blog I wanted it to be a part of that work flow instead of a tool I had to run after the fact. Luckily, Jekyll has support for a few different type of extensions and one of them was perfect for this.
To write an encrypted blog post, I use a change the extension from .md (markdown) to .enc and set the password by adding the line “XXXX ENC:
I even did some fancy storing of the password in your browsers local storage so you don’t have to reenter the key every time.
Go try it out, read one of my old posts where I talk why AV sucks the key is “hello friends!”.
The code for the plugin is below. I’d put it on github but I don’t think anyone should use it.