# How to exclude \_pluigns folder from jekyll build?

**URL:** <https://talk.jekyllrb.com/t/how-to-exclude-pluigns-folder-from-jekyll-build/6609>\
**Category:** Uncategorized\
**Created:** [October 26, 2021, 6:23am UTC](https://talk.jekyllrb.com/t/how-to-exclude-pluigns-folder-from-jekyll-build/6609 "2021-10-26T06:23:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharon](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/sharon/32/4036_2.png) [@sharon](https://talk.jekyllrb.com/u/sharon)\
**Post date:** [October 26, 2021, 6:23am UTC](https://talk.jekyllrb.com/t/how-to-exclude-pluigns-folder-from-jekyll-build/6609/1 "2021-10-26T06:23:39Z")

</div>

At first jekyll build it shows “Pulling in the podcasts. This might take a while…” it is from the podcast plugin, how to exclude this from jekyll build?

---

<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:** [October 26, 2021, 10:07am UTC](https://talk.jekyllrb.com/t/how-to-exclude-pluigns-folder-from-jekyll-build/6609/2 "2021-10-26T10:07:20Z")

</div>

The easiest solution is to use the `--safe` option:

```auto
jekyll build --safe

```

Other alternative methods:

- Rename the folder if you want to exclude all containing plugins.
- Or change the file extension of the podcast plugin from `.rb` to `.txt`.
- Or simply move the podcast plugin to some other location.

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [October 26, 2021, 11:29am UTC](https://talk.jekyllrb.com/t/how-to-exclude-pluigns-folder-from-jekyll-build/6609/3 "2021-10-26T11:29:05Z")

</div>

Do you want to get rid of the plugin altogether?

Or selectively choose between building with and without the plugin?

If there is a plugin directory of plugins, Jekyll will run all of them.

The comment above assumes that there is no `safe: true` flag and that Jekyll will therefore ignore that plugin and keep any others. At the risk of any others not marked safe either of then stopping.

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [October 26, 2021, 11:30am UTC](https://talk.jekyllrb.com/t/how-to-exclude-pluigns-folder-from-jekyll-build/6609/4 "2021-10-26T11:30:29Z")

</div>

Or you can rework the plugin to listen to an optional environment variable

And skip execution

```auto
def generate(site)
  if ENV["PODCASTS"] == "false"
    return 
  end
   
  # Main logic...
end

```

Then you can do

```auto
jekyll build 

PODCASTS=false jekyll build 

```

> <https://github.com/MichaelCurrin/my-github-projects/blob/ba0edef7af1dc1b4c66a67332b7a17d2c3ed44c3/_plugins/github_gql.rb#L9>

---

<div class="post-metadata">

**Author:** ![sharon](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/sharon/32/4036_2.png) [@sharon](https://talk.jekyllrb.com/u/sharon)\
**Post date:** [October 27, 2021, 6:48am UTC](https://talk.jekyllrb.com/t/how-to-exclude-pluigns-folder-from-jekyll-build/6609/5 "2021-10-27T06:48:39Z")

</div>

just to exclude the podcast plugin while jekyll build, because of the plugin it takes time to build

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [October 27, 2021, 12:27pm UTC](https://talk.jekyllrb.com/t/how-to-exclude-pluigns-folder-from-jekyll-build/6609/6 "2021-10-27T12:27:23Z")

</div>

Your answer is not clear and does add new info to the original post. Can you clarify please?

- Do you want _always_ exclude the plugin?
- When do you want it to run? Do you want to include it on a remote build? or a serve?

* * *

Does the plugin expect a value in your config? You have two configs and then locally you could pass both config named to Jekyll so the 2nd config turns off the config.

```auto
# _config.yml
title: My title
baseurl: ''
podcast_url: abc

```

```auto
# _config.dev.yml
podcast_url: ''

```

Then something like

```auto
jekyll build --config=_config.yml,_config.dev.yml

```

And the remote build can use just the one config.

* * *

My recommendation of using env variable to disable to plugin selectively still stands. But requires modifying the plugin.

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [October 27, 2021, 12:29pm UTC](https://talk.jekyllrb.com/t/how-to-exclude-pluigns-folder-from-jekyll-build/6609/7 "2021-10-27T12:29:08Z")

</div>

Some links would help to. Where does the plugin come from? Do the docs for it cover tips for disabling it or reducing build time?
