diff options
Diffstat (limited to 'templates/tags')
| -rw-r--r-- | templates/tags/list.html | 6 | ||||
| -rw-r--r-- | templates/tags/single.html | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/templates/tags/list.html b/templates/tags/list.html index a24ef09..2124b02 100644 --- a/templates/tags/list.html +++ b/templates/tags/list.html @@ -1,4 +1,6 @@ {% extends "base.html" %} +{%- set uglyurls = config.extra.uglyurls | default(value=false) -%} +{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %} {%- block seo %} {{- super() }} @@ -22,9 +24,9 @@ <p>{% for term in terms %} #<a href="#{{ term.name }}">{{ term.name }}</a><sup>{{ term.pages | length }}</sup> {% endfor %}</p> </div> {%- for term in terms %} - <h2 id="{{ term.name }}">#<a href="{{ term.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ term.name }}</a></h2> + <h2 id="{{ term.name }}">#<a href="{{ term.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ term.name }}</a></h2> {%- for page in term.pages %} - <p><a href="{{ page.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format="%F") }}</time></p> + <p><a href="{{ page.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format="%F") }}</time></p> {%- endfor %} {%- endfor %} </div> diff --git a/templates/tags/single.html b/templates/tags/single.html index 8984219..d21d9b0 100644 --- a/templates/tags/single.html +++ b/templates/tags/single.html @@ -1,4 +1,6 @@ {% extends "base.html" %} +{%- set uglyurls = config.extra.uglyurls | default(value=false) -%} +{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %} {%- block seo %} {{- super() }} @@ -21,7 +23,7 @@ {%- for year, posts in term.pages | group_by(attribute="year") %} <h3>{{ year }}</h3> {%- for page in posts %} - <p><a href="{{ page.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format="%F") }}</time></p> + <p><a href="{{ page.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format="%F") }}</time></p> {%- endfor %} {%- endfor %} </div> |
