Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you add live reloading? #5

Open
liquidvisual opened this issue Jul 5, 2018 · 4 comments
Open

Could you add live reloading? #5

liquidvisual opened this issue Jul 5, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@liquidvisual
Copy link

Thanks for making this, great library! Is it possible to add some sort of live reloading - like BrowserSync?

@Splode Splode added the enhancement New feature or request label Jul 8, 2018
@Splode
Copy link
Owner

Splode commented Jul 8, 2018

Thanks, that's a great suggestion. I'm working on live reloading using Browsersync now. I have a working solution for live reloads triggered either by Jekyll or webpack-managed content.

Unfortunately, this still requires manually running two separate shells, one for webpack and one for Jekyll, due to a race condition. Specifically, resources built with webpack --watch are unavailable at the time bundle exec jekyll build --watch is called, causing an error.

I'll continue looking into a more elegant solution, but for the time being this feature is available in the dev branch.

@liquidvisual
Copy link
Author

Nice, thanks for that - I'll check it out!

I've also been playing with vue-jekyll, have you ever used it? If so, what is your opinion of it?

It seems to work quite well (single shell), although its dependencies are very much out of date. I was able to get the Sass working with BrowserSync after adding in the loaders.

@Splode
Copy link
Owner

Splode commented Jul 11, 2018

Yep 👍🏻 In fact, Bryan Schuetz (creator of vue-jekyll) wrote an article, Vue and Jekyll, which was the inspiration for this project. I wanted something similar, but with updated libraries and some features like code-splitting, hashing, etc.

@sonnienguyen
Copy link

I use the npm-run-all npm package, jekyll serve --livereload and webpack —watch to automatically refresh changes.

  "scripts": {
    "dev": "cross-env NODE_ENV=development webpack",
    "build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
+   "serve": "bundle exec jekyll serve --livereload",
+   "start": "run-p watch serve",
    "watch": "cross-env NODE_ENV=development webpack --watch"
  },
# _config.yml

  # Build settings
  markdown: kramdown

+ # Server settings
+ host: 0.0.0.0
+ port: 9001
+ encoding: UTF-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants