middleman/middleman-asciidoc

Populate page metadata with page-related AsciiDoc attributes

mojavelinux opened this issue · 0 comments

It should be possible to populate page metadata, such as the page title, from page-related AsciiDoc attributes. Currently, these attributes are being passed as local variables.

Given the following input:

= Page Title
Author Name
2016-01-10
:page-tags: announcement, release

The following metadata should be assigned:

{ page: { title: 'Page Title', date: '2016-01-10', tags: 'announcement, release' } }

Note that any AsciiDoc attribute that begins with page- is converted into an entry in the page metadata after removing the page- prefix from the key.