initial support for writing YAML front matter back to document