If one or more files in the
_data folder of your GitHub Pages site contains invalid YAML, your GitHub Pages site will not build.
If your GitHub Pages site fails to build because of YAML parsing errors, you'll get an email that looks like this:
Subject: Page build failed
The page build failed with the following error:
There was a YAML syntax error on line `line_number` column `column_number` in `filename`: `syntax_error`.
Troubleshooting YAML parsing errors
Tip: We strongly recommend running Jekyll locally so you can easily debug and fix build errors before pushing to GitHub. To learn more about troubleshooting options, see "Troubleshooting GitHub Pages builds."
Check the YAML files in your
_data folder for the following:
Check the indentation in your YAML file and remove any tab characters, as these may not conform to the suggested spacing for YAML files.
Ensure that you have a space between a key's value and its preceding colon.
Build fail example:
Check your entries for multi-line values. Including a
|will create newlines for each line in the value while including
>will ignore newlines and leave all content on a single line.
Ensure that you're using appropriate quotations. You may need to quote URLs as well as variables or strings that begin with or contain YAML special characters following a colon.
Tip: You can use a tool like YAML Lint to help diagnose and fix YAML errors.
Once you've fixed any YAML errors, you will need to commit your changes and push to your GitHub Pages repository again to trigger another build on the server.
For more help with Jekyll data files, see the Jekyll documentation.