Jekyll character that cannot start any token error

If you get this error:

Error: found character that cannot start any token while scanning for the next token at line 21 column 1 

Check the file from the error message for:

  1. Colon
    In YAML colons separate keys from values, so using them in a value can lead to errors. To resolve: surround the value in double quotes:

    change this:

    permalink: /:categories/:article.html 
    

    to this:

    permalink: "/:categories/:article.html" 
    
  2. Tabs
    If error occurs in _config.yml check if you are using tabs. Do not use tabs in configuration files. Use spaces instead. Using tabs will to errors during parsing or Jekyll will revert to the default settings.

    Change this:

    exclude:
        - "/feed.xml" 
    

    To this:

    exclude:
        - "/feed.xml"
    

1 thought on “Jekyll character that cannot start any token error”

Leave a Comment