New to Jekyll and wondering if it\'s possible to include custom variables in Jekyll Front Matter. It would be useful for nested layouts, for example something like:
layo
I'm not sure if there is a way to do this properly (i.e. server side), but a stop-gap measure could be to have a small snippet of Javascript that sets the correct title in the users browser. e.g.
---
title: Default title blah blah
---
[... content ...]
The substitution of page.artist
is performed in HTML rather than in the Javascript because it is easier to quote any HTML special characters (via escape
) rather than the Javascript special characters '
or "
or \
(there isn't a built-in filter to do this).
One could also move the pagetitle
span to the top of the page so that it is near the other YAML front matter.
Unfortunately, this is a very poor way of achieving this, but it looks like it might be the only way other than writing a plugin.