If your GitHub Pages code references a file that doesn't exist in your _includes directory, your GitHub Pages site will not build.
If you reference a file that doesn't exist in your _includes directory, you'll get an email that looks like this:
Subject: Page build failed
The page build failed with the following error:
A file was included in `example.html` that does not exist in your `_includes` directory
You will only receive an email if outbound email support is enabled on your Enterprise instance. For more information, contact your site administrator.
Troubleshooting a nonexistent file error
Tip: We strongly recommend running Jekyll locally so you can easily debug and fix build errors before pushing to your GitHub Enterprise instance. To learn more about troubleshooting options, see "Troubleshooting GitHub Pages builds."
- Use your favorite text editor to open the file mentioned in the build failure email.
- Search for the
include
tag to see where you've referenced other files. For example:{% include example_header.html %}
. - If you've referenced any files that aren't in the _includes directory of your GitHub Pages repository, you will need to copy or move them into the _includes directory. If the files don't exist at all, you will need to create them.
- Commit the changes and push them to your GitHub Pages repository to trigger another build on the server.