Skip to main content

Setting up Nikloa for Personal Github Sites

After a bit of a struggle I finally moved my personal Github site over from Jekyll to Nikola. I'm documenting what I did here for my future self and in case it's useful to anyone else.

Github setup

  • Create source branch in addition to master, all of the Nickola stuff will happen here. The master branch is where the static site will be served from and the output from nikola build will be put there using ghp-import.
  • Checkout the source branch and initialize your Nikola site (see Nikola getting started)
  • You can now do all the things you need to do with Nikola (pages, posts, theme, etc.)

Syncing site

I am having trouble getting nikola github_deploy working with my setup (Python 3.4, Window 7, in a virtualenv) so here is how I am doing it manually.

  • Make sure ghp-import is installed
    • If you are getting TypeError: Type str doesn't support the buffer API check here for the fix.
  • Use -n -b master output, this will
    • Update the master branch with what's in ./output/
    • Include a .nojekyll file to signal to Github that master is not Jekyll based
  • If you can use nikola deploy you will probably need to edit the following:
GITHUB_SOURCE_BRANCH = 'source'  # changed from 'master'
GITHUB_DEPLOY_BRANCH = 'master'  # changed from 'gh-pages'

Thanks to John Foster and his repository for the example.

Getting Started With Nim

Having been a long time Python user I often find myself reaching for it over languages. When I saw the announcement for version 0.10.2 of Nim on Hacker News it got me interested in learning another language, especially one that compiles to C and executables. I have some experience with C and C++ having done some Arduino projects, but my biggest memory of it is from a programming data structures class I took as an undergrad. All that memory management somehow didn't fit my brain's way of thinking and it turned me off to programming as a profession.

Read more…