# Exclude jekyll-feed in development environment?

**URL:** <https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681>\
**Category:** Uncategorized\
**Created:** [February 27, 2019, 7:20pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681 "2019-02-27T19:20:13Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![NewbieDan](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/newbiedan/32/1483_2.png) [@NewbieDan](https://talk.jekyllrb.com/u/NewbieDan)\
**Post date:** [February 27, 2019, 7:20pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/1 "2019-02-27T19:20:13Z")

</div>

Is it possible to disable jekyll-feed when the environment is development?

Thanks.

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [February 28, 2019, 10:36am UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/2 "2019-02-28T10:36:34Z")

</div>

To my knowledge, there’s no option to disable `jekyll-feed`.  
But may I ask, why you want it to be disabled during development…? It has minimal effect on the overall build times.

---

<div class="post-metadata">

**Author:** ![NewbieDan](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/newbiedan/32/1483_2.png) [@NewbieDan](https://talk.jekyllrb.com/u/NewbieDan)\
**Post date:** [February 28, 2019, 12:24pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/3 "2019-02-28T12:24:23Z")

</div>

Thanks for the reply, and yes, by all means, ask! Maybe you can suggest some alternatives. 😀

I have only 50 posts, and `jekyll-feed` adds about 5 seconds to the build time. Obviously as I create more posts, that number will only grow.

This wouldn’t be a problem, except I have a habit of constantly needing to see what the post looks like while I’m composing it, and the delay has a definite impact.

The main reason I feel the need to constantly look at the results is because my blog posts have a lot of pictures, with them justified left and the corresponding text on the right. Here’s an example: [https://thenewbiewoodworker.com/poweredup/2019/02/27/powered-up-2-12-1.html](https://thenewbiewoodworker.com/poweredup/2019/02/27/powered-up-2-12-1.html)

I suppose the best answer is to wean myself from needing to always look at the results, but I’m a very visual person. Got any other ideas?

Thanks!

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [February 28, 2019, 12:56pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/4 "2019-02-28T12:56:00Z")

</div>

> [@NewbieDan](#):
>
> adds about 5 seconds to the build time

How did you reach to this conclusion?  
Are you developing on Windows?

> [@NewbieDan](#):
>
> Got any other ideas?

A few:

- If you’re on Windows, ensure that you’ve listed &nbsp; `gem 'wdm'` in your Gemfile.
- Use the `--incremental` switch (shorthand:`-I`) to process only those files that change:

```auto
bundle exec jekyll serve -I

```

Now, when you make changes to a particular “post” or “page”, only those and their layouts / includes are _“re-processed”_. The feed will still be generated but the total build time will be much lesser.
- You can always disable a plugin by commenting it out in the `_config.yml`

```auto
plugins:
# - jekyll-feed
- jekyll-sitemap

```

and uncomment before commiting changes.
- You can maintain _two separate config files_ if the above is tiresome. For example, a regular `_config.yml` for production builds on GitHub Pages and the other named a `_config_dev.yml` for local builds.  
Then simply use the latter as following:

```auto
bundle exec jekyll serve --config _config_dev.yml

```

Note: For either of the last two options to work you’ve to ensure the following:

- you’re not using a “theme” that has listed `jekyll-feed` as its `dependency` / `runtime_dependency`.
- you’ve not listed `jekyll-feed` in the `:jekyll_plugins` group in your Gemfile.

---

<div class="post-metadata">

**Author:** ![NewbieDan](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/newbiedan/32/1483_2.png) [@NewbieDan](https://talk.jekyllrb.com/u/NewbieDan)\
**Post date:** [February 28, 2019, 1:21pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/5 "2019-02-28T13:21:23Z")

</div>

Thanks for the great reply!

> How did you reach to this conclusion?

By misunderstanding the output in the Terminal window. 🙄 Thanks for making me take another look at it. Sometimes I can be so blind to the obvious.

![image](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/2X/7/7cc4d92dc1009041a8a4e640d29e62c0ccf024d7.png)

I read this as saying it took `jekyll-feed` 4.7 seconds to generate the feed, when of course it’s saying it took that amount of time for the entire rebuild. D’OH!

> Use the `--incremental` switch (shorthand: `-I` ) to process only those files that change

It seems to me that the last time I tried this, it didn’t work all that well, but I’ll have to try it again before I can say for sure what makes me think that.

> You can maintain _two separate config files_

That is exactly what I wanted. Or would have wanted, if I had been correct about how long it takes to generate the feed file. Regardless, this is very helpful, because I’m sure I’ll have a use for it in the future.

Thank you so much for taking the time to help! Very much appreciated.

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [February 28, 2019, 1:25pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/6 "2019-02-28T13:25:17Z")

</div>

You’re welcome.  
As an aside, if you remove `jekyll-feed` from the `:jekyll_plugins` group in your Gemfile, you’ll get a Dependency missing error.  
To correct, simply list `jekyll-feed` anywhere in your Gemfile, but outside the `:jekyll_plugins` group.

---

<div class="post-metadata">

**Author:** ![NewbieDan](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/newbiedan/32/1483_2.png) [@NewbieDan](https://talk.jekyllrb.com/u/NewbieDan)\
**Post date:** [February 28, 2019, 1:30pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/7 "2019-02-28T13:30:31Z")

</div>

Thanks!

This is what I have in my Gemfile:

```auto
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem 'jekyll-sitemap', group: :jekyll_plugins
gem 'jekyll-seo-tag', group: :jekyll_plugins
gem 'jekyll-feed', group: :jekyll_plugins

```

If I can list `jekyll-feed` without the `group`, then what’s the purpose of specifying a group?

Thanks again.

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [February 28, 2019, 1:45pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/8 "2019-02-28T13:45:38Z")

</div>

> [@NewbieDan](#):
>
> what’s the purpose of specifying a group?

_Disclaimer: This can get a bit technical. I’ll try and keep it simple…_

Honestly, the purpose is only simplification. It is not a requirement.  
Technically, any gem listed in the `:jekyll_plugins` group will be automatically “loaded” by Jekyll even if it is not listed as a plugin in the config file.

The simplification is that one does not have to make changes at two places (Gemfile and a config file)

Now, if you’re wondering _“what’s the purpose of the `plugins` configuration”_, the reason is that some strict environments like GitHub Pages does not include `Bundler`,(a program that Jekyll uses to automatically load gems within the `:jekyll_plugins` group). to control what gets loaded, with an iron-fist.

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [February 28, 2019, 1:53pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/9 "2019-02-28T13:53:00Z")

</div>

> [@NewbieDan](#):
>
> This is what I have in my Gemfile:

Do not add `github-pages` in the `:jekyll_plugins` group. This gem is already a composite of  
`jekyll`, `jekyll-feed`, `jekyll-seo-tag` and some other plugins.

And since that one gem is a composite, you need not list the other plugins as well.  
So, ultimately, your `Gemfile` just needs to be:

```ruby
source 'https://rubygems.org'
gem 'github-pages'

```

Enabling a plugin can be delegated to the config file:

```yaml
plugins:
  # - jekyll-feed
  - jekyll-seo-tag
  - jekyll-sitemap
```

---

<div class="post-metadata">

**Author:** ![NewbieDan](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/newbiedan/32/1483_2.png) [@NewbieDan](https://talk.jekyllrb.com/u/NewbieDan)\
**Post date:** [February 28, 2019, 2:36pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/10 "2019-02-28T14:36:52Z")

</div>

> Disclaimer: This can get a bit technical. I’ll try and keep it simple…

I don’t mind technical. I’m a (retired) developer. Unfortunately, I was a Windows developer, so there’s a lot of “basic” stuff that I know nothing or very little about (like Gems, etc) but I’m learning. (But see my rant below if you care.)

> Do not add `github-pages` in the `:jekyll_plugins` group.

Disclaimer: I didn’t create the Gemfile (at least not to my recollection). I’m not sure how I got it, but in the end, who cares?

I changed my Gemfile as you specified, and I already had the config file lines. It cut my build time almost in half. Of course I don’t have a large site so everything’s relative, but hey, 2 seconds is 2 seconds, right?

I can’t thank you enough for spending some time helping me. I wanted to make that clear, before the following rant. ;p

### This is a rant, just because I need to vent. Feel free to totally ignore it.

I don’t expect answers. I just have to get this out of my system.

**Disclaimer:** _I’m a retired Windows developer, but I’ve been a Mac user for 10 years or so. I have loyalties to both camps, and I am not a platform snob, even if I have my preferences. Whatever works, works._

I wish there was a place where people like me could go to learn all the `Unix/Linux/whatever you call it` stuff, like bundles, gemfiles, etc. It’s all so foreign, and almost all of the information available assumes I already know a lot of things.

Here’s an example:

I’d be reading something, and it might mention “gems”. So I’d have to go and learn what “gems” are, which would lead to things like “bundle” or “homebrew” and the like, and I’d have to learn what they are. And on and on it would go, one term being defined by other terms I don’t know.

Then I’d run something like Bundler, and it outputs hundreds of lines of text, and I’d have no idea if I’m supposed to care about it or not. Sometimes a module would show an error, and I wouldn’t have a clue what to do. I’d try to search for an answer, only to be led further down the rabbit trail of definitions.

I’m technically quite adept. I’m a very fast learner. I just want a primer to help get me up to speed. But I feel like Amy Adams in “Arrival”, trying to understand the aliens’ language.

### End rant

I feel so much better now.

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [February 28, 2019, 2:42pm UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/11 "2019-02-28T14:42:39Z")

</div>

> [@NewbieDan](#):
>
> I just want a primer to help get me up to speed.

Start at the following link:

> **[Ruby 101](https://jekyllrb.com/docs/ruby-101/)**
>
> Jekyll is written in Ruby. If you’re new to Ruby, this page helps you learn some of the terminology.

---

<div class="post-metadata">

**Author:** ![deepfriedbrain](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/deepfriedbrain/32/360_2.png) [@deepfriedbrain](https://talk.jekyllrb.com/u/deepfriedbrain)\
**Post date:** [April 29, 2019, 7:25am UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/12 "2019-04-29T07:25:55Z")

</div>

I’m also trying to exclude Jekyll feed from Dev environment. I’m already using 2 different config files for Production and Dev. I have excluded jekyll-feed plugin from the dev config file, but Jekyll Feed still runs.

\_config.yml:  
`plugins: [jekyll-paginate, jekyll-sitemap, jekyll-feed, jekyll-last-modified-at, jekyll-assets]`

\_config\_dev.yml:  
`plugins: [jekyll-paginate, jekyll-assets]`

start.dev:  
`bundle exec jekyll serve --port 3000 --incremental --config _config.yml,_config_dev.yml`

Am I missing something?

Thanks.

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [April 29, 2019, 7:41am UTC](https://talk.jekyllrb.com/t/exclude-jekyll-feed-in-development-environment/2681/13 "2019-04-29T07:41:44Z")

</div>

Ensure that you’ve **not listed `jekyll-feed` in the `:jekyll_plugins` group** in your Gemfile.  
For further control, build your site under `--safe` mode and whitelisting the required plugins:

```auto
# config_dev.yml
safe: true
whitelist: [jekyll-paginate, jekyll-assets]
plugins: [jekyll-paginate, jekyll-assets]
```
