CarbonNeuron 33ba8d8eaa
Add configuration options for opening external links in new tab (#1360)
I've whipped up a solution that solves #1103. I've added a config option `nav_external_links_new_tab`, which is off by default. When turned on, it'll pop external nav links into a new tab. The idea was borrowed from how [aux_nav.html](https://github.com/just-the-docs/just-the-docs/blob/main/_includes/components/aux_nav.html) does it with `aux_links_new_tab`.

---------

Co-authored-by: Matt Wang <matt@matthewwang.me>
2023-10-04 12:10:56 -07:00

33 lines
1.1 KiB
HTML

{%- comment -%}
Include as: {%- include components/sidebar.html -%}
Depends on: page(?), site.
Results in: HTML for the side bar.
Includes:
title.html, components/site_nav.html, nav_footer_custom.html
Overwrites:
nav_footer_custom.
Should not be cached, because nav_footer_custom.html might depend on page.
{%- endcomment -%}
<div class="side-bar">
<div class="site-header" role="banner">
<a href="{{ '/' | relative_url }}" class="site-title lh-tight">{% include title.html %}</a>
<button id="menu-button" class="site-button btn-reset" aria-label="Toggle menu" aria-pressed="false">
<svg viewBox="0 0 24 24" class="icon" aria-hidden="true"><use xlink:href="#svg-menu"></use></svg>
</button>
</div>
{% include_cached components/site_nav.html %}
{% 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>