Copyright 2021 Simon Quantrill, All Rights Reserved

Moving to Jekyll from google

Wed 18 April 2012

I needed a fairly quick way in which to move from blogger to a simple blog as I am not in truth a real blogger! I hate the new privacy rules with google and Im trying to move away but I also need to have a platform mail to vent my frustrations and to note things down. Which up until this point was google blogger. So anyhow..I had a look around and found out that there was something called jekyll and markdown. I struggled for a long while playing with jekyll and github and getting frustrated that it wasn’t working as I had expected it to. I am not a programmer so for me programer things are not really my cup of tea. Any one problem I faced was that I have up until now been using macjournal to do all my blogging and I like it to be honest but there is not a way as far as I can tell to export to markdown other that sending to a blog site So my fix.. I have the jekyell install on my mac right click on the Blog in macjournal making sure that the Title is and filename is included in the exported files I select separate files for each entry and save these files in to the post/Blog directory once the files have been saved I run the below script I knocked up what this does is to rename all the files in folder to the format required for jeykll. #!/bin/bash for file in * do x=$(stat -f ‘%SB’ -t ‘%Y-%m-%d-%Y%m_%d.mmd’ “$file”) mv “$file” “$x” filename=echo $file | sed ‘s/.txt//g’ echo “—-” | cat - $x > /tmp/out && mv /tmp/out $x echo “title: $filename” | cat - $x > /tmp/out && mv /tmp/out $x echo “layout: default” | cat - $x > /tmp/out && mv /tmp/out $x echo “—-” | cat - $x > /tmp/out && mv /tmp/out $x done After I have the files created and changed to the correct format I then copy these back to the _post directory and run jekyll jekyll && rsync -avz —delete _site/ -e ssh root@ 0 drwxr-xr-x 12 quantrill 300 408 18 Apr 10:41 . 0 drwx———+ 41 quantrill 300 1394 11 Apr 16:44 .. 16 -rw-r—r—@ 1 quantrill 300 6148 18 Apr 10:42 .DS_Store 0 drwxr-xr-x 15 quantrill 300 510 13 Apr 15:46 .git 0 -rw-r—r— 1 quantrill 300 0 11 Apr 16:44 README 8 -rw-r—r— 1 quantrill 300 108 17 Apr 20:43 _config.yml 0 drwxr-xr-x 5 quantrill 300 170 17 Apr 23:17 _layouts 0 drwxr-xr-x 64 quantrill 300 2176 18 Apr 11:51 _posts 0 drwxr-xr-x 13 quantrill 300 442 18 Apr 11:48 _site 0 drwxr-xr-x 4 quantrill 300 136 17 Apr 19:54 css 0 drwxr-xr-x 5 quantrill 300 170 13 Apr 15:21 img 8 -rw-r—r— 1 quantrill 300 1137 17 Apr 23:16 index.html

on the top