From 0ff0a4bbab7de10da46723bac7f188b4c4021130 Mon Sep 17 00:00:00 2001
From: Nathan Jessen <nathanjessen@users.noreply.github.com>
Date: Mon, 4 Jul 2022 13:28:39 -0600
Subject: [PATCH] Create nav_footer_custom (#474)

**Rationale**
I would like to customize the site footer content without needing to override the entire default layout. Ideally, I'd like to shorten the attribution to something like "Built with Just the Docs"

**Implementation**
Create a new `site_footer.html` include that users can override.

**Possible changes**
I debated whether or not the `<footer class="site-footer">` should be in/out of the include. I opted for placing it inside the include so I have the option of disabling the footer entirely by creating an empty site_footer file in my site.

Co-authored-by: Matt Wang <matt@matthewwang.me>
Co-authored-by: Patrick Marsceill <pmarsceill@users.noreply.github.com>
---
 _includes/nav_footer_custom.html |  0
 _layouts/default.html            | 14 +++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
 create mode 100644 _includes/nav_footer_custom.html

diff --git a/_includes/nav_footer_custom.html b/_includes/nav_footer_custom.html
new file mode 100644
index 00000000..e69de29b
diff --git a/_layouts/default.html b/_layouts/default.html
index 0563275a..efaa1e53 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -85,9 +85,17 @@ layout: table_wrappers
         {% endfor %}
       {% endif %}
     </nav>
-    <footer class="site-footer">
-      This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
-    </footer>
+
+    {% capture nav_footer_custom %}
+      {%- include nav_footer_custom.html -%}
+    {% endcapture %}
+    {% if nav_footer_custom != "" %}
+      {{ nav_footer_custom }}
+    {% else %}
+      <footer class="site-footer">
+        This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
+      </footer>
+    {% endif %}
   </div>
   <div class="main" id="top">
     <div id="main-header" class="main-header">
-- 
GitLab