From 5fd9c3b32c67cb023ac281708f91fdc1cda3bfd7 Mon Sep 17 00:00:00 2001 From: Nathan Jessen <nathanjessen@users.noreply.github.com> Date: Mon, 4 Jul 2022 13:22:47 -0600 Subject: [PATCH] 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> --- docs/customization.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/customization.md b/docs/customization.md index 075e30d9..94587efc 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -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.`. -- GitLab