From d5c3dbb4c64829b140a46f25be5d4eda1a6a23fc Mon Sep 17 00:00:00 2001 From: Che <43485962+c-git@users.noreply.github.com> Date: Sun, 24 Jul 2022 21:06:17 -0400 Subject: [PATCH] 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 --- templates/index.html | 1 + templates/sec_toc_2_level.html | 5 ----- templates/section.html | 6 ------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/templates/index.html b/templates/index.html index f9ed677..fe34f3e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -29,6 +29,7 @@ {% endif -%}
+ {# 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 %} diff --git a/templates/sec_toc_2_level.html b/templates/sec_toc_2_level.html index 35ee8e4..542da4a 100644 --- a/templates/sec_toc_2_level.html +++ b/templates/sec_toc_2_level.html @@ -1,9 +1,4 @@

Table of Contents

-{% if not config.extra.easydocs_uglyurls -%} - {% set _ugly_url = "" -%} -{% else %} - {% set _ugly_url = "index.html" -%} -{% endif -%} {% if section.subsections -%}