Live reload local Jekyll site in browser on file changes
The other day, I was looking for a way using which I can reload my local Jekyll instance every time I make some changes into the files.
So, I dig through the following --help
command hoping to find if something in-built is there or not,
$ jekyll serve --help
And fortunately, there was an option called -l
(or --livereload
) which can do exactly the same as I wanted which is to detect file changes and live reloading the browser instance.
As you may guess, all we need to do is append the -l
option to jekyll serve
command like so.
$ jekyll serve -l
And it will automatically reload your local Jekyll site in the browser every time you make changes in files.
You can further couple the -o
(or --open-url
) option which will launch your site in your browser automatically.
$ jekyll serve -l -o
Like this article?
Buy me a coffee👋 Hi there! I'm Amit. I write articles about all things web development. You can become a sponsor on my blog to help me continue my writing journey and get your brand in front of thousands of eyes.