`jekyll serve` doesn't pickup new collections automatically

I have a local server up using jekyll serve. When I add a new collections (I update the _config.yml and create a corresponding directory), it’s not automatically served. I checked the _site directory and it contains no subdirectory for the newly added collection.
However, if I run jekyll build, the _site directory contains the subdirectory for the collection.

Is this expected behavior where adding a new collection requires a build step for local server to pick it up?

I am using jekyll 4.0.1. Please let me know if you need more information.

Hey @mohshar916, welcome to the community.

Any changes to _config.yml does indeed require restarting the server for the changes to take effect.

So if you’re using jekyll serve for local development, just stop and restart it.

jekyll build doesn’t run a webserver in the background. It’s a one-time thing so it’ll pick up any changes you’ve made to _config.yml.

Hope that helps.

1 Like

Hi @ckruse! Thanks for your answer!
It makes sense now! Just restarting the local server also works, jekyll build is not required for serving content locally.

1 Like