Production versus Development env?

228 views
Skip to first unread message

Nate

unread,
Feb 4, 2011, 11:40:11 AM2/4/11
to jekyll.rb
Does anyone disable Disqus or other features locally, while in
"development" mode?

I would like a feature to be able to turn something on or off,
depending on
the environment.

I saw that Jekyll has a site.[CONFIGURATION_OPTIONS] that you can put
in
config.yml. If Jekyll could take command line params this way, it
could be a solution.

For example, in config.yml, I could have:

site.enable_disqus=true (or whatever the correct yaml way is)

And in my "development mode" I could run:

jekyll --server --auto --site.enable_disqus=false

However, I poked around at Jekyll command line and it doesn't appear
you can pass
custom options to jekyll. I also investigated Liquid, to see if it
could access Environment
varaibles, (e.g. {% if $DEVMODE %} ) but I couldn't find anything
there, either.

Any ideas?

Thanks,
--Nate

Davi Barbosa

unread,
Feb 4, 2011, 11:50:59 AM2/4/11
to jeky...@googlegroups.com
Passing options as parameters would be very useful!
I am simulating this with a Rake file that changes the config.yml, but it is an ugly hack.


--
You received this message because you are subscribed to the Google Groups "jekyll.rb" group.
To post to this group, send email to jeky...@googlegroups.com.
To unsubscribe from this group, send email to jekyll-rb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jekyll-rb?hl=en.


Nathan Neff

unread,
Feb 4, 2011, 11:57:33 AM2/4/11
to jeky...@googlegroups.com
On Fri, Feb 4, 2011 at 10:50 AM, Davi Barbosa <dbar...@gmail.com> wrote:
> Passing options as parameters would be very useful!
> I am simulating this with a Rake file that changes the config.yml, but it is
> an ugly hack.

Would you mind posting your rake file? My Ruby is rusty.

Thanks,
--Nate

Davi Barbosa

unread,
Feb 4, 2011, 12:18:41 PM2/4/11
to jeky...@googlegroups.com
On Fri, Feb 4, 2011 at 2:57 PM, Nathan Neff <natha...@gmail.com> wrote:
On Fri, Feb 4, 2011 at 10:50 AM, Davi Barbosa <dbar...@gmail.com> wrote:
> Passing options as parameters would be very useful!
> I am simulating this with a Rake file that changes the config.yml, but it is
> an ugly hack.

Would you mind posting your rake file?  My Ruby is rusty.


Reply all
Reply to author
Forward
0 new messages