PS regarding Makefile, the pattern across projects is âdefaultâ to do âinstallâ. And âallâ to do say install and build. So an empty project could have all run, or do it prepush.
I like to have an alias for help
h help:
@grep ...
So
make h
And I donât bother grepping comments. It is obvious what install and serve do from their names in the context of Jekyll so comments donât add value.
What happens if you refresh the page after the auto reload? It is possible that the incremental or reload is causing the page to refresh before the CSS file is rebuilt completely so the browser thinks the file is missing.
Also try serve with no flags. Go back to basics and add flags one at a time to see which one breaks
It works fine for a moment, when I edit something, it gets broke.
everything is fine console as well as terminal.
bundle exec jekyll server
it works for 1 or 2 minutes then I edit something and it stops working.
when I create a new test jekyll site
junaid@ijunaid8989:~/testpath$ jekyll server
Configuration file: /home/junaid/testpath/_config.yml
Source: /home/junaid/testpath
Destination: /home/junaid/testpath/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 0.845 seconds.
jekyll 3.9.1 | Error: no implicit conversion of Hash into Integer
/home/junaid/.rvm/gems/ruby-3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read': no implicit conversion of Hash into Integer (TypeError)
from /home/junaid/.rvm/gems/ruby-3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read'
And then the bad style page has CSS like this for 2800 lines. It pulls in normalize.css but lacks your custom CSS.
/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
/** 1. Change the default font family in all browsers (opinionated). 2. Prevent adjustments of font size after orientation changes in IE and iOS. */
html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ }
// ...
Something in Jekyll is creating Normalize CSS as assets/css/style.css in addition to your own file. When you serve your site, then your custom one comes last and âwinsâ. On a reload, the Normalize CSS one overwrites the style.css file and âwinsâ.
I donât know what is generating the normalize CSS file. Maybe one of the many gems in the github pages gem listed here Dependency versions | GitHub Pages
A fix I found locally was to rename the style.css file to styles.css - which any is more inline with convention in CSS.