Chalk is a high quality, completely customizable, performant and 100% free blog template for Jekyll.
Overview
Features:
- About page.
- Automatic RSS feed.
- Automatic sitemap.
- Automatic time to read post indicator.
- Cross browser support (supports all modern browsers).
- Custom 404 page.
- Custom code highlighting.
- Customizable pagination.
- Dark and Light theme.
- Easy setup and deploying.
- Enlarge images on click.
- Filter on tags.
- Optional tag navigation.
- Frequently updated with new versions.
- Many social media links supported.
- Media embed for videos.
- PageSpeed optimized.
- Proper sharing links for posts on Facebook, Twitter and Google Plus.
- SEO optimized.
- Support for local fonts.
- Support for emoji's.
Integrations
Used tools
- Autoprefixer
- Circle CI
- Html-proofer
- Jekyll
- Jekyll Assets
- Jekyll Sitemap
- HTML5 Boilerplate (Influenced by)
- Kickster
- Retina.js
- STACSS
- Travis
- Yarn
- Zooming
Usage
Installation
If you haven't installed the following tools then go ahead and do so (make sure you have Homebrew installed):
brew install ruby
brew install npm
On windows, install Ruby and Node with the installers found here:
Next setup your environment:
npm run setup
Development
Run Jekyll:
npm run local
Deploy to GitHub Pages
Before you deploy, commit your changes to any working branch except the gh-pages
one and run the following command:
npm run publish
Important note: Chalk does not support the standard way of Jekyll hosting on GitHub Pages. You need to deploy your working branch (can be any branch, for xxx.github.io users: use another branch than master
) with the npm run publish
command. Reason for this is because Chalk uses Jekyll plugins that aren't supported by GitHub pages. The npm run publish
command will automatically build the entire project, then push it to the gh-pages
branch of your repo. The script creates that branch for you so no need to create it yourself. Also, if you are developing a project site, you must set the baseurl
in _config.yml
to the name of your repository.
You can find more info on how to use the gh-pages
branch and a custom domain here.
View this for more info about automated deployment with Circle CI.
License
MIT License
Contributing
- Fork it (https://github.com/[my-github-username]/chalk/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Invalid Tags
I made an article following your sample one. You can check it out on my repo here this is what I get on my github account:
Can't Generate Theme Locally
I was getting this error in Terminal
Liquid Exception: undefined method "line_number" for "":String in /_layouts/post.html jekyll 3.5.0 | Error: undefined method "line_number" for "":String
I found the error in
/_includes/head.html
it was with these two lines
{% assign thumb_image = page.thumb_image | asset_path | absolute_url %} {% endif %} {% else %} {% assign thumb_image = og-image.jpg | asset_path | absolute_url %} {% endif %}
Once I removed
|
. I could generate the theme locally for development.I've also run into a problem when running your deploy script, but I think that's because I'm using Gitlab. I don't know anything about scripts and was wondering if there was a way, I could tailor the script so that it would push and deploy to a Gitlab repo instead of Github.
Jules
Pagination not show with high probability
Hi there, sorry to interrupt you. I really love chalk, a charming theme. However, I met a problem when using it and hope someone could help me.
I just copy your example articles several times to test pagination. I refresh the page and test a lot of times. I find there is large probability that the pagination foot does not show. For example:
This is correct pagination:
This is the failing pagination:
Add Turbolinks
Turbolinks makes navigating Chalk even faster. For only 33 KB, you get an SPA that renders additional page views ~2x faster. There's a small learning curve to Turbolinks, but I find the benefits far outweigh the costs. This PR will manually add Turbolinks and restructure the existing JS for compatibility.
Check it out and let me know what you think. I'm also planning to strip jQuery, load all JS async, and slightly enhance the page transition (by adding a fade out on link clicks). If any of this sounds interesting, I can send additional pull requests.
404 Page Not Found
I followed the exact steps mentioned in the README
But I still see the following message in the settings tab
Your site is having problems building: The tag asset_path on line 1 in _includes/image.html, is not a recognized Liquid tag.
Pls help!
Use svg icons instead of ionicons font
Pretty self-explanatory. We not only use a tiny subset of that font, but there are advantages to using svg over font for icons.
Some further insight into this here.
Ionicons in svg: https://github.com/driftyco/ionicons/tree/master/src
Github pages no longer building properly
I mirrored my old website repo (https://github.com/nbulischeck/website) to a new repo (https://nbulischeck.github.io/project6/) and rebuilt the project. I'm now getting 404 errors when github tries to load the wrong resource.
I tried this with a newer clone of Chalk and still received the same errors (gh-pages trying to pull css/js resources from
name-long_string_of_hex.js
. Any help?unable to apply dark theme on github pages
including
blog_theme: dark
in config, no results on github pages after build. Still light theme.Built on windows 10.
First issue so lmk if I need to supply more.
Unkown tag 'asset_path' when trying to deploy locally.
I keep getting the following error when i try to deploy jekyll locally.
I have been fiddling around with this a lot and I haven't been able to solve it and google doesn't help either.
I have managed to get it up and running on github using the Rakefile provided by http://ixti.net/software/2013/01/28/using-jekyll-plugins-on-github-pages.html
I would really like to be able to deploy locally so that I can write posts and see them locally and not post half finished content to the live page.
Epic theme otherwise :)
speed up the google fonts for chinese
Chinese Internet Providers ban googleβs domains,When I first try Chalk, the google web fonts were not loaded, This causes a big delay, so I cache them locally..Help Chinese users enjoy Chalk!
Created NPM scripts in package.json to replace current build commands (and added Drafts support).
& Added Intellij system files to .gitignore
Changes
npm run
commands for the build, development, and publish features of the theme.bin/setup
->npm run setup
bundle exec jekyll serve
->npm run local
bin/deploy
->npm run publish
--drafts
flag tobundle exec jekyll serve
so draft articles will work.Rationale
Changes to the commands (like adding
--drafts
) can occur without the user having to change the command they run. They runnpm run local
and behind the scenes the maintainers can update that command's function as needed.Instead of having to remember longer commands or file paths, just run
npm run <the thing you want>
and it Shall Be Done for you. This was more of a pet peeve of mine.Testing
This is not platform-dependent and all commands have been tested to work successfully.
Concerns
NPM has some standard commands (
publish
is one of them). If you runnpm publish
on this repo, the command will fail and give an error message that will lead the user down a red herring. They won't know that the command they want isnpm run publish
. The fix would be to rename the commands to any keyword that is not in the list of scripts, but I really like the word publish for the action that is happening. It probably makes more sense to make itnpm run deploy
, though.Add MathJax to support LaTeX
Hi, I love your Chalk so much. It's very elegant. I found I need LaTeX so I added MathJax to support it.
And there is an error in gtag.js, it should be in the head.html instead of the javascripts.html. Otherwise, Google Analytics will make an error when detecting gtag.js. So I move the gtag.js to the head.html.
And thanks for your works.
publish: false files are deleted after npm run publish
I have some posts that had
publish: false
in their front matter. I would like to know if this is respected in the deploy file when I runnpm run publish
, as I can no longer find the files.[Information] Running Chalk on Windows
Hey for everyone having problems with Chalk on Windows.
First make sure you have Msys64 installed or use the one that comes with Ruby Installer with DevKit. I recommend using rubyinstaller-devkit-2.7.4-1. Ruby 3.0 might cause you issues when you running your npm run local or publish.
Next is to make sure you edit packages.json so it has "setup": "sh bin/setup" and "publish": "sh bin/deploy". Sh is needed so you can run your scripts via git bash environment. Also, when you first install Ruby, you might get 'bundler command not found'.
Make sure you use gem install bundler without "--conservative" in setup file. Last but not least, use gitbash terminal. Using powershell or cmd will lead you to some issues with "find" command during deployment and development.
That's it, after some days of research I can finally build my first blog. Thanks @nielsenramon ! If anyone ever stumble with some issues on Windows do not hesitate to ping me here.
Cheers.
Error deploying docs (imcompatible character encodings)
After
serve
-ing the website locally and it working, I pushed to my GitHub, and it errored:So then I added a hard constraint on
jekyll-assets
in theGemfile
as per solution here, but now I am getting this error when trying to deploy:I also had to change line 11 in
bin/deploy
fromto
as it was erroring.
[error] on sudo npm run local
`> chalk@ local /home/ahmed/chalk
Configuration file: /home/ahmed/chalk/_config.yml Source: /home/ahmed/chalk Destination: /home/ahmed/chalk/_site Incremental build: disabled. Enable with --incremental Generating... /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/document.rb:449: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/document.rb:449: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/document.rb:449: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/document.rb:449: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/document.rb:449: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/document.rb:449: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/tags/include.rb:194: warning: Using the last argument as keyword parameters is deprecated /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/tags/include.rb:194: warning: Using the last argument as keyword parameters is deprecated Liquid Exception: "\xE2" on US-ASCII in /_layouts/post.html jekyll 3.8.6 | Error: "\xE2" on US-ASCII Traceback (most recent call last): 122: from /home/ahmed/.gem/ruby/2.7.0/bin/bundle:23:in
<main>' 121: from /home/ahmed/.gem/ruby/2.7.0/bin/bundle:23:in
load' 120: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/exe/bundle:37:in<top (required)>' 119: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/friendly_errors.rb:130:in
with_friendly_errors' 118: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/exe/bundle:49:inblock in <top (required)>' 117: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli.rb:24:in
start' 116: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/base.rb:485:instart' 115: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli.rb:30:in
dispatch' 114: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor.rb:392:indispatch' 113: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in
invoke_command' 112: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:inrun' 111: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli.rb:494:in
exec' 110: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:28:inrun' 109: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:63:in
kernel_load' 108: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:63:inload' 107: from /usr/bin/jekyll:23:in
<top (required)>' 106: from /usr/bin/jekyll:23:inload' 105: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/exe/jekyll:15:in
<top (required)>' 104: from /usr/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:inprogram' 103: from /usr/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in
go' 102: from /usr/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:inexecute' 101: from /usr/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in
each' 100: from /usr/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:inblock in execute' 99: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:75:in
block (2 levels) in init_with_program' 98: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:instart' 97: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in
each' 96: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:inblock in start' 95: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:36:in
process' 94: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:65:inbuild' 93: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/command.rb:28:in
process_site' 92: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:71:inprocess' 91: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:191:in
render' 90: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:462:inrender_docs' 89: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:462:in
each_value' 88: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:463:inblock in render_docs' 87: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:463:in
each' 86: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:464:inblock (2 levels) in render_docs' 85: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:479:in
render_regenerated' 84: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:62:inrun' 83: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:88:in
render_document' 82: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:158:inplace_in_layouts' 81: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:195:in
render_layout' 80: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:126:inrender_liquid' 79: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:28:in
render!' 78: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:49:inmeasure_time' 77: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:29:in
block in render!' 76: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:42:inmeasure_bytes' 75: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:30:in
block (2 levels) in render!' 74: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:220:inrender!' 73: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:207:in
render' 72: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:242:inwith_profiling' 71: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:208:in
block in render' 70: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:91:inrender' 69: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in
render_node_to_output' 68: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/tags/include.rb:137:inrender' 67: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/context.rb:123:in
stack' 66: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/tags/include.rb:140:inblock in render' 65: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:28:in
render!' 64: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:49:inmeasure_time' 63: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:29:in
block in render!' 62: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:42:inmeasure_bytes' 61: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:30:in
block (2 levels) in render!' 60: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:220:inrender!' 59: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:207:in
render' 58: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:242:inwith_profiling' 57: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:208:in
block in render' 56: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:82:inrender' 55: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in
render_node_to_output' 54: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:43:inrender' 53: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/context.rb:123:in
stack' 52: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:44:inblock in render' 51: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:44:in
each' 50: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:46:inblock (2 levels) in render' 49: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:82:in
render' 48: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:inrender_node_to_output' 47: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:43:in
render' 46: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/context.rb:123:instack' 45: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:44:in
block in render' 44: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:44:ineach' 43: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:46:in
block (2 levels) in render' 42: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:91:inrender' 41: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in
render_node_to_output' 40: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:70:inrender' 39: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:58:in
render_raw' 38: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:164:ininternal' 37: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:86:in
find_asset!' 36: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/logger.rb:24:inwith_timed_logging' 35: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:87:in
block in find_asset!' 34: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/patches/find_asset.rb:9:infind_asset!' 33: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/patches/cached.rb:47:in
find_asset!' 32: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:inload' 31: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in
block in initialize' 30: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:inload' 29: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in
fetch_asset_from_dependency_cache' 28: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:inblock in load' 27: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in
load_from_unloaded' 26: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:incall_processors' 25: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in
reverse_each' 24: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:inblock in call_processors' 23: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in
call_processor' 22: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:incall' 21: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:in
dfs' 20: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:inblock in call' 19: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in
load' 18: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:inblock in initialize' 17: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in
load' 16: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:infetch_asset_from_dependency_cache' 15: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in
block in load' 14: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:inload_from_unloaded' 13: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in
call_processors' 12: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:inreverse_each' 11: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in
block in call_processors' 10: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:incall_processor' 9: from /usr/lib/ruby/gems/2.7.0/gems/autoprefixer-rails-10.2.0.0/lib/autoprefixer-rails/sprockets.rb:16:in
call' 8: from /usr/lib/ruby/gems/2.7.0/gems/autoprefixer-rails-10.2.0.0/lib/autoprefixer-rails/sprockets.rb:22:inrun' 7: from /usr/lib/ruby/gems/2.7.0/gems/autoprefixer-rails-10.2.0.0/lib/autoprefixer-rails/processor.rb:35:in
process' 6: from /usr/lib/ruby/gems/2.7.0/gems/autoprefixer-rails-10.2.0.0/lib/autoprefixer-rails/processor.rb:143:inruntime' 5: from /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/module.rb:27:in
compile' 4: from /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:incompile' 3: from /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:in
new' 2: from /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:8:ininitialize' 1: from /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/encoding.rb:22:in
encode' /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/encoding.rb:22:inencode': "\\xE2" on US-ASCII (Encoding::InvalidByteSequenceError) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! chalk@ local:
bundle exec jekyll serve --drafts` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the chalk@ local script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install?npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-01-16T14_26_29_375Z-debug.log`
and this is my /root/.npm/_logs/2021-01-16T14_26_29_375Z-debug.log:
2021-01-16T14_26_29_375Z-debug.log info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'local' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prelocal', 'local', 'postlocal' ] 5 info lifecycle chalk@~prelocal: chalk@ 6 info lifecycle chalk@~local: chalk@ 7 verbose lifecycle chalk@~local: unsafe-perm in lifecycle true 8 verbose lifecycle chalk@~local: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ahmed/chalk/node_modules> 9 verbose lifecycle chalk@~local: CWD: /home/ahmed/chalk 10 silly lifecycle chalk@~local: Args: [ '-c', 'bundle exec jekyll serve --drafts' ] 11 silly lifecycle chalk@~local: Returned: code: 1 signal: null 12 info lifecycle chalk@~local: Failed to exec local script 13 verbose stack Error: chalk@ local:
bundle exec jekyll serve --drafts13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (node:events:379:20) 13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (node:events:379:20) 13 verbose stack at maybeClose (node:internal/child_process:1065:16) 13 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:296:5) 14 verbose pkgid chalk@ 15 verbose cwd /home/ahmed/chalk 16 verbose Linux 5.4.86-1-lts 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "local" 18 verbose node v15.6.0 19 verbose npm v6.14.11 20 error code ELIFECYCLE 21 error errno 1 22 error chalk@ local:
bundle exec jekyll serve --drafts22 error Exit status 1 23 error Failed at the chalk@ local script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]
Jekyll server not updating and crashing on exit (Windows)
Whenever I start the server with 'npm run local', there is no way to exit it cleanly. Ctrl-C doesn't work in the standard Windows terminal and in Git Bash it makes the whole console freeze. In both case, I need to force close them and the execution exits with code 1. Also, it seems like the server doesn't see any file updates. I have tried with --force_polling option, to no avail. Sometimes it will detect a change, but it's extremely rare and random. Note that I don't experience these issues on a vanilla Jekyll setup.