Add support for more dynamic templateContexts #37

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@lafka
lafka commented Mar 3, 2014

Hi,

Made some changes that makes it possible to hook into parser and annotate with metadata.

  • Always add source and destination file to templateContext
  • Allow for parser that may find metadata
  • Make parser injectable through the .parser option

The reason I needed this was to add support for dynamically generated menus.

An example parser that adds support for YAML metadata can be found here : tinymesh/tm-docs@3004136.
The metadata can then be used from the template.

@lafka lafka Add support for more dynamic templateContexts
+ Always add templateContext.{src,dest}
+ Allow for parser that may find metadata
+ Make parser injectable through the .parser option
8ea93b1
@treasonx
Owner

This is a great idea, but I would require some documentation in the readme and some unit tests.

@DavidBeale

+1 For the source and destination paths

@treasonx treasonx closed this Jan 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment