Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for environments #361

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eellson
Copy link

@eellson eellson commented Jan 27, 2018

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 the configure :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.

As of https://github.com/middleman/middleman/pull/1293/files middleman
splits the notion of `:mode` and `:config`. 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 the `configure :blog do ...` 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:
middleman#238,
middleman#191,
middleman#143
@coveralls
Copy link

coveralls commented Jan 27, 2018

Coverage Status

Coverage decreased (-0.2%) to 92.702% when pulling a67ec00 on eellson:environment-support into fec110f on middleman:master.

@markets
Copy link
Member

markets commented Feb 4, 2024

Hey @eellson 👋🏼 I'm helping to maintain this project now, could you please summarize why we need this feature?

Copy link

This issue is stale because it has been open for more than 90 days with no activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants