aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/404.html2
-rw-r--r--templates/base.html11
-rw-r--r--templates/index.html2
-rw-r--r--templates/macros/macros.html20
-rw-r--r--templates/macros/page.html2
5 files changed, 19 insertions, 18 deletions
diff --git a/templates/404.html b/templates/404.html
index f2de753..f72c54f 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -19,6 +19,6 @@
<div>
<h1>Page not found :(</h1>
<p>The page you are looking for doesn't exist or has been moved.</p>
- <p>Try using the search, or <a href="{{ config.base_url | safe }}">go home</a>.</p>
+ <p>Try using the search, or <a href="{{ config.base_url | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">go home</a>.</p>
</div>
{%- endblock content %}
diff --git a/templates/base.html b/templates/base.html
index ac6356d..0bbd48d 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -31,17 +31,17 @@
<nav>
<header>
{%- if config.extra.logo %}
- <h1><a href="{{ config.base_url | safe }}">{%- if config.extra.logo.file %}<img src="{{ config.base_url | safe }}/{{ config.extra.logo.file | safe }}" {%- if config.extra.logo.alt %}alt="{{ config.extra.logo.alt | safe }}" {%- endif %}{%- if config.extra.logo.width %}width="{{ config.extra.logo.width | safe }}" {%- endif %}{%- if config.extra.logo.height %}height="{{ config.extra.logo.height | safe }}"{%- endif %}/>{%- endif %}{%- if config.extra.logo.text %}{{ config.extra.logo.text | safe }}{%- endif %}</a></h1>
+ <h1><a href="{{ config.base_url | safe }}{%- if config.extra.uglyurls %}/index.html{%- endif %}">{%- if config.extra.logo.file %}<img src="{{ config.base_url | safe }}/{{ config.extra.logo.file | safe }}" {%- if config.extra.logo.alt %}alt="{{ config.extra.logo.alt | safe }}" {%- endif %}{%- if config.extra.logo.width %}width="{{ config.extra.logo.width | safe }}" {%- endif %}{%- if config.extra.logo.height %}height="{{ config.extra.logo.height | safe }}"{%- endif %}/>{%- endif %}{%- if config.extra.logo.text %}{{ config.extra.logo.text | safe }}{%- endif %}</a></h1>
{%- elif config.extra.textlogo %}
- <h1><a href="{{ config.base_url | safe }}">{{ config.extra.textlogo | safe }}</a></h1>
+ <h1><a href="{{ config.base_url | safe }}{%- if config.extra.uglyurls %}/index.html{%- endif %}">{{ config.extra.textlogo | safe }}</a></h1>
{%- elif config.title %}
- <h1><a href="{{ config.base_url | safe }}">{{ config.title | safe }}</a></h1>
+ <h1><a href="{{ config.base_url | safe }}{%- if config.extra.uglyurls %}/index.html{%- endif %}">{{ config.title | safe }}</a></h1>
{%- endif %}
</header>
<div>
<ul>
{%- for i in config.extra.menu %}
- <li><h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name | safe }}</a></h2></li>
+ <li><h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}{%- if i.slash and config.extra.uglyurls %}index.html{%- endif %}">{{ i.name | safe }}</a></h2></li>
{%- endfor %}
</ul>
</div>
@@ -95,10 +95,11 @@
{#- Copyright END #}
<p>
{%- for i in config.extra.menu_footer %}
- <a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name | safe }}</a> &nbsp;
+ <a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}{%- if i.slash and config.extra.uglyurls %}index.html{%- endif %}">{{ i.name | safe }}</a> &nbsp;
{%- endfor %}
</p>
+
{%- if config.extra.footer_credit | default(value=true) %}
{%- if config.extra.footer_credit_override %}
{{ config.extra.footer_credit_override | safe }}
diff --git a/templates/index.html b/templates/index.html
index 9c25da9..a2f5b30 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -36,7 +36,7 @@
{{ page.content | safe | striptags | truncate(length=150) }}
{%- elif page.extra.static_thumbnail %}
{%- endif %}
- <a href="{{ page.permalink | safe }}">...more</a>
+ <a href="{{ page.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">...more</a>
</p>
</article>
{%- endfor %}
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index 16a4e12..8003420 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -1,16 +1,16 @@
{%- macro title(page) %}
- <h1><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
+ <h1><a href="{{ page.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ page.title }}</a></h1>
<span>{{ page.date | date(format="%B %d, %Y") }}
{%- if page.taxonomies.authors and config.taxonomies %} by
{%- for author in page.taxonomies.authors %}
{%- if author_flag %} and {% endif %}
- <a href="{{ get_taxonomy_url(kind='authors', name=author) | safe }}">{{ author }}</a>
+ <a href="{{ get_taxonomy_url(kind='authors', name=author) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ author }}</a>
{%- set_global author_flag = true %}
{%- endfor %}
{%- elif config.extra.author and config.extra.author_show %} by {{ config.extra.author }}
{%- endif %}
-{%- if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind="categories", name=cat) | safe }}">{{ cat }}</a>{% endfor %}]{% endif %}
-{%- if page.taxonomies.tags %} {%- for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">{{ tag }}</a> {% endfor -%}{%- endif %}
+{%- if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind='categories', name=cat) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ cat }}</a>{% endfor %}]{% endif %}
+{%- if page.taxonomies.tags %} {%- for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind='tags', name=tag) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ tag }}</a> {% endfor -%}{%- endif %}
{%- if config.extra.readtime %} - {{ page.reading_time }} {{ config.extra.readtime_string | default(value="min") }} {% endif %}</span>
{%- endmacro title %}
@@ -51,21 +51,21 @@
{%- endif %}
<nav>
<ul>
- {% if paginator.previous %}<li><a href="{{ paginator.first | safe }}">&#124; &#60;</a></li>{% else %}<li><span class="off">&#124; &#60;</span></li>{% endif %}
- {% if paginator.previous %}<li><a href="{{ paginator.previous | safe }}">&#60;</a></li>{% else %}<li><span class="off">&#60;</span></li>{% endif %}
+ {% if paginator.previous %}<li><a href="{{ paginator.first | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">&#124; &#60;</a></li>{% else %}<li><span class="off">&#124; &#60;</span></li>{% endif %}
+ {% if paginator.previous %}<li><a href="{{ paginator.previous | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">&#60;</a></li>{% else %}<li><span class="off">&#60;</span></li>{% endif %}
{%- for i in range(start=start, end=end+1) %}
<li>
{%- if i == paginator.current_index -%}
<a class="cnav" href="#">{{i}}</a>
{%- elif i > 1 -%}
- <a href="{{ paginator.base_url | safe }}{{ i ~ '/' }}">{{i}}</a>
+ <a href="{{ paginator.base_url | safe }}{{ i ~ '/' }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{i}}</a>
{%- else -%}
- <a href="{{ paginator.first | safe }}">{{ i }}</a>
+ <a href="{{ paginator.first | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ i }}</a>
{%- endif -%}
</li>
{%- endfor %}
- {% if paginator.next %}<li><a href="{{ paginator.next | safe }}">&#62;</a></li>{% else %}<li><span class="off">&#62;</span></li>{% endif %}
- {% if paginator.next %}<li><a href="{{ paginator.last | safe }}">&#62; &#124;</a></li>{% else %}<li><span class="off">&#62; &#124;</span></li>{% endif %}
+ {% if paginator.next %}<li><a href="{{ paginator.next | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">&#62;</a></li>{% else %}<li><span class="off">&#62;</span></li>{% endif %}
+ {% if paginator.next %}<li><a href="{{ paginator.last | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">&#62; &#124;</a></li>{% else %}<li><span class="off">&#62; &#124;</span></li>{% endif %}
</ul>
</nav>
{%- endif %}
diff --git a/templates/macros/page.html b/templates/macros/page.html
index d5ef918..9c5b156 100644
--- a/templates/macros/page.html
+++ b/templates/macros/page.html
@@ -1,5 +1,5 @@
{%- macro page_listing(page) %}
<div class="toc-item">
- <a href="{{ page.permalink | safe}}" title="{{ page.title }}">{{ page.title }}</a>
+ <a href="{{ page.permalink | safe}}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="{{ page.title }}">{{ page.title }}</a>
</div>
{%- endmacro page_listing %}