Org based posts in Nikola

Chen Bin asked me to share my Nikola+Org work-flow, and share an example post.

The org source for any post can be found by changing the URL of a post from .html to .org.

I don't have much of a work-flow, because I don't post too often, but here is what I typically do, to make a new post.

I start off by creating a new post using

$ nikola new_post

and then give the post a title and start editing the post in Emacs.

I have a simple snippet that lets me insert tags, based on existing tags.

Once I'm happy with the content of a post, I run nikola auto to build the source and serve it locally, and see if the post "looks" reasonable, after being rendered.

Once, I'm happy with it, I commit the post and deploy it using nikola deploy.

    'nikola orphans|xargs rm || true',
    'git checkout master',
    'nikola build',
    './commit-changes || true',
    'git checkout --orphan gh-pages',
    'git rm -rf .',
    'git checkout master -- .gitignore',
    'git checkout master -- commit-changes',
    'mv output/* .',
    'git push -f origin gh-pages:gh-pages',
    'git checkout master',
    'git branch -D gh-pages',
    'git push origin master',

I also have a plugin, that posts captured bookmarks and quotes onto the blog, with a single command. I should probably make the sources of my blog open, and push it onto GitHub.


Bookmarks [2014-04-11]


Quotes [2014-04-04]

  • “My idea of dominating is that I get all of the players on my team to play better than if I wasn’t there.” – Ben Wiggins
  • “It is a risk to love. What if it doesn't work out? Ah, but what if it does.” ― Peter McWilliams
  • "Wherever you go, go with all your heart" – Confucius
  • "Work is never finished, only abandoned.” —Paul Valéry
  • "Satisfaction of one's curiosity is one of the greatest sources of happiness in life." – Linus Pauling