Often I start reading a page on my desktop and want to continue reading on my phone so I'll send the link to myself. I figured that an easier way would be for pages to have a self-referential QR Code embedded so I did just that for my blog. I probably won't use it but I wanted to see if I could. Here's how I did it.
I was using the default "Casper" theme so the first step was to create a copy of it. The sed command changes the package just a little so that Ghost doesn't complain or try to overwrite the default Casper. The ed command inserts a "div" element in the footer (assuming you are using a non-edited Casper 2.1.2 default.hbs file). Regardless, put the "div" wherever you want the QR Code to appear.
% rsync -avP ./content/themes/casper/ /tmp/keith/ % sed -i "" 's/"casper"/"casper-keith"/;s/default/(almost) default/' /tmp/keith/package.json % ed /tmp/keith/default.hbs<<EOF H 31a <div id="kj-qr-code"></div> . EOF % (cd /tmp/keith; zip -r /tmp/keith.zip .)
I used qrcode-generator here and copied it into a directory on my web-server.
Create Code Injection Code