I recently changed my website from a bunch of hand-stiched webpages dynamically generated by python scripts to using Hyde.

Old

My “old” website was dynamically generated using a number of python scripts used the python cgi module to get passed in arguments. These included the main landing page, index.py, a script to fetch the article, get_article.py, a script to fetch the gallery, gallery.py and so on. The articles were in a repository on bitbucket as markdown files with the script below to generate the html from the markdown.

1
2
3
4
5
for file in *.markdown; do
  file=$(echo $file | sed -e 's/.markdown$//')
  echo markdown_py -x codehilite -f ${file}.html ${file}.markdown
  markdown_py -x codehilite -f ${file}.html ${file}.markdown
done

At one point, there was a security hole in my get_article.py script which the csc admin asked me to fix. Such problems a common with dynamically generated websites. The old website was also missing other goodies that I desired like “common look and feel” of the webpages, templating, etc. that weren’t that easy to achieve (and maintain/update/change) with the hand-stiched pages.

New

I started looking at Jekyll but there weren’t any nice themes for it (or at least none that I found satisfactory) but then I came across Hyde and found this elegant, minimalist and best of all, opensource theme by Jake VanderPlas vanderplas. From there, it took me a couple of hours to modify it to my needs, add a blog, add a markdown + code highlighting filter to it and I was done.

The code for my “new” website is being hosted at github. Now all I need to do to add a new article is …

1
2
3
vim content/blog/website_redesign.html
hyde gen -r
hyde -v publish -p ssh -c production.yaml

… and hyde generates my website, and uploads it to my csclub webspace.