To add arbitrary metadata to a post just do it.
For example, if you are using nikola style metadata that looks like
.. title: foo
You can add your own called frobnozz by adding a line such as
.. frobnozz: whatever
As for how to use it in the template: in all places where it makes sense you will have a post object. Use it as the other metadata is used (something like post.meta('frobnozz') ) but really look for an example because I am on a train and can't reach the docs right now and don't remember :)
I see how I can use tags or something similar to set metadata, but do not see how I can set arbitrary or custom pieces of metadata without creating plugin. Also, the `pagekind` variable seems like exactly what I need, but I could not find a way of setting it. In the meantime I found that I could use a test like
{% if permalink == "/" %} but I don't know how robust that is.