innolitics / rdm

Our regulatory documentation manager. Streamlines 62304, 14971, and 510(k) documentation for software projects.
MIT License
109 stars 29 forks source link

Make document YAML front matter available as variables #65

Open johndgiese opened 4 years ago

johndgiese commented 4 years ago

We want to make the variables in a document's YAML front matter available in templates.

It should work the same way Jekyll works:

https://jekyllrb.com/docs/front-matter/#custom-variables

Only, use "document" instead of "page".

Also, be sure to consider what would/should occur if there were a file named data/document.yml. I propose that we simply disallow the use of the file data/document.yml OR we merge it with the YAML front matter, having the front matter take precedence.

Once this change is made, we should update the init_files/documents/release_record.md to set the release_id with a document-level variable.