Revert "Markdown writer: Don't include variables in metadata."

This reverts commit 0ec8573347d53e0cba70552a50dba697f39216b6.
Switched order of fields in yaml header (writer test).