I'd like to render posts to different folders depending on a status code in the metadata.
For example, if I have an attribute of status: draft
I'd like for these items to be rendered to a folder called /draft/
, while status: live
would be rendered to /blog/
. I could then password protect the draft
folder so that only I could view it. If there is no status at all it would default to draft.
Is this possible?
In your rules file, use the following:
This will create a directory for each status you have. Eg: A source file that begins with
will be created in the /testing/ folder.
To remove leftover files after compilation, you can use “nanoc prune” (new in nanoc 3.3.x).