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

Drop support for global attributes config key #52

Closed mojavelinux closed 6 years ago

mojavelinux commented 6 years ago

Drop support for the global config key :asciidoc_attributes. For example:

set :asciidoc_attributes, ['source-highlighter=coderay']

This was the pre-Middleman 4 way of configuring an extension. The modern way of configuring an extension is to pass a key (attributes) to the activate function, which is already supported by this extension.

mojavelinux commented 6 years ago

In fact, the documentation clearly states:

Passing options to activate is preferred to setting global or singleton variables.

These global settings exist for legacy reasons. The AsciiDoc support use to be part of Middleman core, so the only way to configure it was through global settings. Now that it's a proper extension, we can rely on configuration via the activate function.