Jekyll: --livereload does not work in a barebones project

Created on 27 Sep 2018  路  3Comments  路  Source: jekyll/jekyll

Code Sample

  • Create a new folder
  • Create a sample index.html file (e.g. the one from the Jekyll tutorial)
  • Run jekyll serve --livereload
  • Open localhost:4000

index.html

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Home</title>
  </head>
  <body>
    <h1>Hello World!</h1>
  </body>
</html>
frozen-due-to-age support

Most helpful comment

@behrangs-sportsbet There are two things required for --livereload to work:

  • <head></head> markup tag in the main layout or index.html
  • Front matter dashes in the source file.

In your case, the index.html is missing front matter dashes. So, Jekyll sees index.html as a static_file instead of a page..

All 3 comments

@behrangs-sportsbet There are two things required for --livereload to work:

  • <head></head> markup tag in the main layout or index.html
  • Front matter dashes in the source file.

In your case, the index.html is missing front matter dashes. So, Jekyll sees index.html as a static_file instead of a page..

Thanks! Adding the front matter made livereload kick in.

Closing this ticket now..

Was this page helpful?
0 / 5 - 0 ratings