If the _config.yml file in your GitHub Enterprise Pages repository has syntax errors, your GitHub Enterprise Pages site will not build.

If your GitHub Enterprise Pages site fails to build because the _config.yml file contains syntax errors, we'll send you an email that looks like this:

Subject: Page build failed

The page build failed with the following error:

"You have an error on line 1 of your `_config.yml` file."

You will only receive an email if email support is enabled on your Enterprise instance. For more information, contact your site administrator.

Troubleshooting _config.yml syntax errors

We strongly recommend running Jekyll locally so you can easily debug and fix build errors before pushing to your GitHub Enterprise instance.

Check your _config.yml file at the line referenced in the build failure email. Ensure that:

  • You are using spaces instead of tabs in the file.
  • You have included a space after the ":" for each key/value pair. For example, timezone: Africa/Nairobi, not timezone:Africa/Nairobi.
  • You are only using UTF-8 characters.
  • You quote any special characters. For example, title: "my awesome site: an adventure in parse errors", not title: my awesome site: an adventure in parse errors.

Use a YAML linter, such as http://codebeautify.org/yaml-validator, to validate your YAML code. If you run into parse errors with your _config.yml file, try copying and pasting the contents of the file into such a tool for more details.

Once you've fixed any syntax errors in your _config.yml file, you will need to commit your changes and push to your GitHub Enterprise Pages repository again to trigger another build on our servers.

Further reading: