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?
The easiest solution is to use the --safe
option:
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.
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.
Or you can rework the plugin to listen to an optional environment variable
And skip execution
def generate(site)
if ENV["PODCASTS"] == "false"
return
end
# Main logic...
end
Then you can do
jekyll build
PODCASTS=false jekyll build
just to exclude the podcast plugin while jekyll build, because of the plugin it takes time to build
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.
# _config.yml
title: My title
baseurl: ''
podcast_url: abc
# _config.dev.yml
podcast_url: ''
Then something like
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.
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?