Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As of https://github.com/middleman/middleman/pull/1293/files middleman splits the notion of
:mode
and:environment
. This PR updates middleman-blog to also handle this distinction.This allows generation of blogposts using config for a particular environment using the
--environment
flag. e.g:middleman article 'Awesome new post' --environment blog
would look for config within theconfigure :blog do ... end
block.The main gotcha I see is that this requires
Time.zone
to be set in config.rb also. I wonder though if that is related to one of the various other date-related issues:#238, #191, #143
Additionally, the
-e
alias is already used for editing on this project, while for middleman itself, and other extensions, this is used for environment specification. I've left out that alias for now.