middleman / middleman-asciidoc

:beginner: AsciiDoc support for Middleman 4. (In Middleman 3, AsciiDoc support is provided by a core extension).
https://middlemanapp.com
Other
27 stars 12 forks source link

Support the use of custom templates #73

Closed mojavelinux closed 6 years ago

mojavelinux commented 6 years ago

Support the use of custom Asciidoctor templates by providing an option in the activation to specify a set of template directories.

activate :asciidoc do |asciidoc|
  asciidoc.template_dirs = ['source/_templates']
end

The values of the :template_dirs option should be resolved to absolute paths. The option should then be passed on to the Asciidoctor processor. If the value is a String, it should first be coerced to an Array.

mojavelinux commented 6 years ago

We could consider making this option implicit based on the presence of a standard directory (e.g., source/_asciidoctor_templates).