Removed duplicated code

Was refactoring it out then realized that all pages extend index.html
Therefore the variable was already in the available context on all pages
This commit is contained in:
Che 2022-07-24 21:06:17 -04:00
parent c50ccf9fb1
commit d5c3dbb4c6
3 changed files with 1 additions and 11 deletions

View file

@ -29,6 +29,7 @@
</script>
{% endif -%}
<main>
{# Create variable to allow appending index.html at end of links if set in config #}
{% if not config.extra.easydocs_uglyurls -%}
{% set _ugly_url = "" -%}
{% else %}

View file

@ -1,9 +1,4 @@
<h2>Table of Contents</h2>
{% if not config.extra.easydocs_uglyurls -%}
{% set _ugly_url = "" -%}
{% else %}
{% set _ugly_url = "index.html" -%}
{% endif -%}
{% if section.subsections -%}
<ul>
{% for subsec in section.subsections -%}

View file

@ -3,12 +3,6 @@
{% block title %} {{ config.title }} | {{ section.title }} {% endblock title %}
{% block content %}
{% if not config.extra.easydocs_uglyurls -%}
{% set _ugly_url = "" -%}
{% else %}
{% set _ugly_url = "index.html" -%}
{% endif -%}
{% if section.word_count > 0 -%}
{{ section.content | safe }}
{% else -%}