Merge pull request #13 from LASSAT-YU/master

Fix issue with ugly url affecting `zola serve`
This commit is contained in:
Roman 2022-08-14 17:47:54 +02:00 committed by GitHub
commit 4089bb8c99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@
{% endif -%} {% endif -%}
<main> <main>
{# Create variable to allow appending index.html at end of links if set in config #} {# Create variable to allow appending index.html at end of links if set in config #}
{% if not config.extra.easydocs_uglyurls -%} {% if not config.extra.easydocs_uglyurls or config.mode == "Serve" -%}
{% set _ugly_url = "" -%} {% set _ugly_url = "" -%}
{% else %} {% else %}
{% set _ugly_url = "index.html" -%} {% set _ugly_url = "index.html" -%}
@ -101,13 +101,7 @@
<ul> <ul>
{% for h3 in h2.children -%} {% for h3 in h2.children -%}
<li> <li>
<a href=" <a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
{{ h3.permalink | safe }}{{ _ugly_url }}">{{ h3.title }}</a>
</li> </li>
{% endfor -%} {% endfor -%}
</ul> </ul>