Chalk is a high quality, completely customizable, performant and 100% free Jekyll blog theme.

  • By Nielsen Ramon
  • Last update: Dec 31, 2022
  • Comments: 17

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

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

  1. Fork it (https://github.com/[my-github-username]/chalk/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Github

https://github.com/nielsenramon/chalk

Comments(17)

  • 1

    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:

    Your site is having problems building: The tag asset_path on line 1 in _posts/2016-11-28-user-login-sign-up-using-firebase-in-swift-3.md is not a recognized Liquid tag. For more information, see https://help.github.com/articles/page-build-failed-unknown-tag-error. 
    
  • 2

    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

  • 3

    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: screen shot 2017-03-03 at 11 04 27 This is the failing pagination:

    screen shot 2017-03-03 at 11 04 17 I would really appreciate it if someone could help me to stable the pagination. Thanks in advance!
  • 4

    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.

  • 5

    404 Page Not Found

    I followed the exact steps mentioned in the README

    • Set up everything
    • Added a 'dev' branch (not master)
    • Ran bin/deploy successfully

    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!

  • 6

    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

  • 7

    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?

  • 8

    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.

  • 9

    Unkown tag 'asset_path' when trying to deploy locally.

    I keep getting the following error when i try to deploy jekyll locally.

    +grandmother:thegrandmother.github.com<master>$ bundle exec jekyll serve
    Configuration file: /home/grandmother/git/thegrandmother.github.com/_config.yml
    Configuration file: /home/grandmother/git/thegrandmother.github.com/_config.yml
                Source: /home/grandmother/git/thegrandmother.github.com
           Destination: /home/grandmother/git/thegrandmother.github.com/_site
     Incremental build: disabled. Enable with --incremental
          Generating... 
      Liquid Exception: Liquid syntax error (line 13): Unknown tag 'asset_path' in /home/grandmother/git/thegrandmother.github.com/_includes/head.html, included in /_layouts/post.html
    jekyll 3.4.1 | Error:  Liquid syntax error (line 13): Unknown tag 'asset_path'
    

    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 :)

  • 10

    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!

  • 11

    Created NPM scripts in package.json to replace current build commands (and added Drafts support).

    & Added Intellij system files to .gitignore

    Changes

    • Created 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
    • Added the --drafts flag to bundle 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 run npm 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 run npm 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 is npm 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 it npm run deploy, though.

  • 12

    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.

  • 13

    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 run npm run publish, as I can no longer find the files.

  • 14

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

    image

    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.

  • 15

    Error deploying docs (imcompatible character encodings)

    After serve-ing the website locally and it working, I pushed to my GitHub, and it errored:

    The tag `asset` on line 24 in `_includes/head.html` is not a recognized Liquid tag.
    

    So then I added a hard constraint on jekyll-assets in the Gemfile as per solution here, but now I am getting this error when trying to deploy:

      Liquid Exception: incompatible character encodings: ASCII-8BIT and UTF-8 in /_layouts/post.html
    jekyll 3.8.6 | Error:  incompatible character encodings: ASCII-8BIT and UTF-8
    Traceback (most recent call last):
    	37: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/bin/ruby_executable_hooks:22:in `<main>'
    	36: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/bin/ruby_executable_hooks:22:in `eval'
    	35: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/bin/jekyll:23:in `<main>'
    	34: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/bin/jekyll:23:in `load'
    	33: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/exe/jekyll:15:in `<top (required)>'
    	32: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
    	31: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
    	30: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
    	29: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
    	28: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
    	27: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:18:in `block (2 levels) in
     init_with_program'
    	26: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:36:in `process'
    	25: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:65:in `build'
    	24: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/command.rb:28:in `process_site'
    	23: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/site.rb:71:in `process'
    	22: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/site.rb:191:in `render'
    	21: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/site.rb:462:in `render_docs'
    	20: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/site.rb:462:in `each_value'
    	19: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/site.rb:463:in `block in render_docs'
    	18: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/site.rb:463:in `each'
    	17: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/site.rb:464:in `block (2 levels) in render_docs'
    	16: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/site.rb:479:in `render_regenerated'
    	15: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:62:in `run'
    	14: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:88:in `render_document'
    	13: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:158:in `place_in_layouts'
    	12: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:195:in `render_layout'
    	11: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:126:in `render_liquid'
    	10: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:28:in `render!'
    	 9: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
    	 8: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:29:in `block in render!'
    	 7: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:42:in `measure_bytes'
    	 6: from /Users/jakeireland/.rvm/gems/ruby-2.7.2/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:30:in `block (2 levels) in render!'
    	 5: from /Users/jakeireland/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:220:in `render!'
    	 4: from /Users/jakeireland/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:207:in `render'
    	 3: from /Users/jakeireland/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:242:in `with_profiling'
    	 2: from /Users/jakeireland/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:208:in `block in render'
    	 1: from /Users/jakeireland/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:97:in `render'
    /Users/jakeireland/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:97:in `join': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
    

    I also had to change line 11 in bin/deploy from

    if [ `git branch | grep gh-pages` ]
    

    to

    if [[ $(git branch | grep gh-pages) ]]
    

    as it was erroring.

  • 16

    [error] on sudo npm run local

    `> chalk@ local /home/ahmed/chalk

    bundle exec jekyll serve --drafts

    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:inload' 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:inwith_friendly_errors' 118: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/exe/bundle:49:in block in <top (required)>' 117: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli.rb:24:instart' 116: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 115: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli.rb:30:indispatch' 114: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 113: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:ininvoke_command' 112: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 111: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli.rb:494:inexec' 110: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:28:in run' 109: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:63:inkernel_load' 108: from /root/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:63:in load' 107: from /usr/bin/jekyll:23:in<top (required)>' 106: from /usr/bin/jekyll:23:in load' 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:in program' 103: from /usr/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:ingo' 102: from /usr/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in execute' 101: from /usr/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:ineach' 100: from /usr/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in block in execute' 99: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:75:inblock (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:in start' 97: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:ineach' 96: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in block in start' 95: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:36:inprocess' 94: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:65:in build' 93: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/command.rb:28:inprocess_site' 92: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:71:in process' 91: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:191:inrender' 90: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:462:in render_docs' 89: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:462:ineach_value' 88: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:463:in block in render_docs' 87: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:463:ineach' 86: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:464:in block (2 levels) in render_docs' 85: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:479:inrender_regenerated' 84: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:62:in run' 83: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:88:inrender_document' 82: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:158:in place_in_layouts' 81: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:195:inrender_layout' 80: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/renderer.rb:126:in render_liquid' 79: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:28:inrender!' 78: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:49:in measure_time' 77: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:29:inblock in render!' 76: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:42:in measure_bytes' 75: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:30:inblock (2 levels) in render!' 74: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:220:in render!' 73: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:207:inrender' 72: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:242:in with_profiling' 71: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:208:inblock in render' 70: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:91:in render' 69: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:inrender_node_to_output' 68: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/tags/include.rb:137:in render' 67: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/context.rb:123:instack' 66: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/tags/include.rb:140:in block in render' 65: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:28:inrender!' 64: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:49:in measure_time' 63: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:29:inblock in render!' 62: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:42:in measure_bytes' 61: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-3.8.6/lib/jekyll/liquid_renderer/file.rb:30:inblock (2 levels) in render!' 60: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:220:in render!' 59: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:207:inrender' 58: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:242:in with_profiling' 57: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:208:inblock in render' 56: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:82:in render' 55: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:inrender_node_to_output' 54: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:43:in render' 53: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/context.rb:123:instack' 52: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:44:in block in render' 51: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:44:ineach' 50: 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' 49: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:82:inrender' 48: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in render_node_to_output' 47: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:43:inrender' 46: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/context.rb:123:in stack' 45: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:44:inblock in render' 44: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:44:in each' 43: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/if.rb:46:inblock (2 levels) in render' 42: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:91:in render' 41: from /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:inrender_node_to_output' 40: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:70:in render' 39: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:58:inrender_raw' 38: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:164:in internal' 37: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:86:infind_asset!' 36: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/logger.rb:24:in with_timed_logging' 35: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:87:inblock 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:in find_asset!' 33: from /usr/lib/ruby/gems/2.7.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/patches/cached.rb:47:infind_asset!' 32: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in load' 31: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:inblock in initialize' 30: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in load' 29: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:infetch_asset_from_dependency_cache' 28: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in block in load' 27: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:inload_from_unloaded' 26: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in call_processors' 25: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:inreverse_each' 24: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in block in call_processors' 23: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:incall_processor' 22: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:in call' 21: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:indfs' 20: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:in block in call' 19: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:inload' 18: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in block in initialize' 17: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:inload' 16: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in fetch_asset_from_dependency_cache' 15: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:inblock in load' 14: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in load_from_unloaded' 13: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:incall_processors' 12: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in reverse_each' 11: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:inblock in call_processors' 10: from /usr/lib/ruby/gems/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in call_processor' 9: from /usr/lib/ruby/gems/2.7.0/gems/autoprefixer-rails-10.2.0.0/lib/autoprefixer-rails/sprockets.rb:16:incall' 8: from /usr/lib/ruby/gems/2.7.0/gems/autoprefixer-rails-10.2.0.0/lib/autoprefixer-rails/sprockets.rb:22:in run' 7: from /usr/lib/ruby/gems/2.7.0/gems/autoprefixer-rails-10.2.0.0/lib/autoprefixer-rails/processor.rb:35:inprocess' 6: from /usr/lib/ruby/gems/2.7.0/gems/autoprefixer-rails-10.2.0.0/lib/autoprefixer-rails/processor.rb:143:in runtime' 5: from /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/module.rb:27:incompile' 4: from /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:in compile' 3: from /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:innew' 2: from /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:8:in initialize' 1: from /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/encoding.rb:22:inencode' /usr/lib/ruby/gems/2.7.0/gems/execjs-2.7.0/lib/execjs/encoding.rb:22:in encode': "\\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 ]

  • 17

    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.