Download the script from github
This is a simple bash script that takes a markdown
.md document and publishes it directly to your blot folder. If you don’t have citations in your post, there is no real need to run this script. However, if you do want to include citations in blog posts and while David at Blot works out whether it’s worthwhile adding a feature to directly parse citations in
md to the
.html that renders on .blot sites, this script should keep you sweet.
It needs a little preparation.
.cslstyle document (how pandoc makes your citations look)
When you’ve done that, save the script somewhere sensible.
The script assumes that you’re already using pandoc and pandoc-citeproc to render useful documents from markdown.
bash /path/to/script/p2b.sh inFileName.md
bash ~/Dropbox/shellScripts/p2b.sh example.md
The script will look for an images folder and a files folder, if there is one where your
.md is, it will copy the contents to corresponding folders in your
.blot directory. This means any images you refer to in your canonical document will be copied across. Bear in mind however that if you don’t place an _ (underscore) in front of image names, they will be published as blog posts as well. I have taken to naming my files thus:
Have fun.., oh and here’s some citations to be sure that the script is working properly for this post. Notice, that in markdown, I’ve added a final section
#References. Citations will show up underneath this (Parker (2018), MacFarlane (2006–2016), Smalley (1997))
MacFarlane, J. (2006–2016). Pandoc. Retrieved from http://pandoc.org/
Parker, M. (2018). Sonikebana, version 1.0 documentation example. https://doi.org/http://dx.doi.org/10.7488/ds/2351
Smalley, D. (1997). Spectromorphology: Explaining sound-shapes. Organised Sound, 2(2), 107–126. https://doi.org/10.1017/S1355771897009059