Add docs for custom includes (#806)

These docs outline some of the custom includes that are provided by the theme and can be modified by the user.

Co-authored-by: Matt Wang <matt@matthewwang.me>
Co-authored-by: Patrick Marsceill <pmarsceill@users.noreply.github.com>
This commit is contained in:
Nathan Jessen 2022-07-04 13:22:47 -06:00 committed by GitHub
parent 70b34f01f7
commit 5fd9c3b32c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,3 +122,35 @@ For example, if you'd like to add your own styles for printing a page, you could
}
}
```
## Override includes
The site can be modified by overriding any of the custom [Jekyll includes](https://jekyllrb.com/docs/includes/) provided by default in the theme.
To do this, create an `_includes` directory and make a copy of the specific file you wish to modify. Any content added to this file will override the theme defaults. You can learn more about this process in the Jekyll docs for [Overriding theme defaults](https://jekyllrb.com/docs/themes/#overriding-theme-defaults).
The following includes were made available to you:
### Custom Footer
`_includes/footer_custom.html`
This content appears at the bottom of every page's main content. More info for this include can be found in the [Configuration - Footer content]({% link docs/configuration.md %}#footer-content).
### Custom Head
`_includes/head_custom.html`
Any HTML added to this file will be inserted before the closing `<head>` tag. This might include additional `<meta>`, `<link>`, or `<script>` tags.
### Custom Header
`_includes/header_custom.html`
Content added to this file appears at the top of every page's main content between the site search and auxiliary links if they are enabled. If `search_enabled` were set to false and `aux_links` were removed, the content of `header_custom.html` would occupy the space at the top of every page.
### Custom Nav Footer
`_includes/nav_footer_custom.html`
Any content added to this file will appear at the bottom left of the page below the site's navigation. By default an attribution to Just the Docs is displayed which reads, `This site uses Just the Docs, a documentation theme for Jekyll.`.