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

--livereload does not work in a barebones project #7279

Closed
behrangs-sportsbet opened this issue Sep 27, 2018 · 3 comments
Closed

--livereload does not work in a barebones project #7279

behrangs-sportsbet opened this issue Sep 27, 2018 · 3 comments
Labels
frozen-due-to-age support This is a question about Jekyll's usage.

Comments

@behrangs-sportsbet
Copy link

  • 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

My Environment

Software Version(s)
Operating System Ubuntu 18.04
jekyll Latest

Expected Behaviour

Changes to index.html should automatically be reflected in the browser.

Current Behavior

Changes to index.html are not automatically reflected in the browser.

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>
@ashmaroli
Copy link
Member

@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..

@ashmaroli ashmaroli added the support This is a question about Jekyll's usage. label Sep 27, 2018
@behrangs-sportsbet
Copy link
Author

Thanks! Adding the front matter made livereload kick in.

@ashmaroli
Copy link
Member

Closing this ticket now..

@jekyll jekyll locked and limited conversation to collaborators Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age support This is a question about Jekyll's usage.
Projects
None yet
Development

No branches or pull requests

3 participants