mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-04 03:01:23 -06:00
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>
This commit is contained in:
parent
ff3771968b
commit
0ff0a4bbab
0
_includes/nav_footer_custom.html
Normal file
0
_includes/nav_footer_custom.html
Normal file
@ -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">
|
||||
|
Loading…
x
Reference in New Issue
Block a user