Add DISABLE_PAGE_LINKS and DISABLE_PAGE_BLANK_TARGET configuration parameters.
DISABLE_PAGE_LINKS will disable generation of links to static pages, only user defined links will be added to the left sidebar. DISABLE_PAGE_BLANK_TARGET will cause user defined links to open in the same tab instead of a new tab.
This commit is contained in:
parent
bbdd09733b
commit
9084cb343f
1 changed files with 9 additions and 3 deletions
|
@ -91,18 +91,24 @@
|
||||||
|
|
||||||
{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}
|
{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}
|
||||||
|
|
||||||
{% if pages or LINKS %}
|
{% if (pages and not DISABLE_PAGE_LINKS) or LINKS %}
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
|
{%if not DISABLE_PAGE_LINKS %}
|
||||||
{% if not PAGES_SORT_ATTRIBUTE -%}
|
{% if not PAGES_SORT_ATTRIBUTE -%}
|
||||||
{% set PAGES_SORT_ATTRIBUTE = 'title' %}
|
{% set PAGES_SORT_ATTRIBUTE = 'title' %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% for page in pages|sort(attribute=PAGES_SORT_ATTRIBUTE) %}
|
{% for page in pages|sort(attribute=PAGES_SORT_ATTRIBUTE) %}
|
||||||
<li><a href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">{{ page.title }}</a></li>
|
<li><a href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">{{ page.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% for name, link in LINKS %}
|
{% for name, link in LINKS %}
|
||||||
|
{% if DISABLE_PAGE_BLANK_TARGET %}
|
||||||
|
<li><a href="{{ link }}">{{ name }}</a></li>
|
||||||
|
{% else %}
|
||||||
<li><a href="{{ link }}" target="_blank">{{ name }}</a></li>
|
<li><a href="{{ link }}" target="_blank">{{ name }}</a></li>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Add table
Reference in a new issue