mirror of
https://github.com/zaaarf/friendenstein.git
synced 2024-11-22 15:34:50 +01:00
feat: external link redirect
This commit is contained in:
parent
e8addb1d70
commit
a7b25ca5cc
2 changed files with 15 additions and 6 deletions
|
@ -17,6 +17,10 @@
|
|||
{{ marginals::navbar(current_lang=current_lang) }}
|
||||
</header>
|
||||
<main>
|
||||
{%- if page.extra.redirect -%}
|
||||
<meta http-equiv="Refresh" content="0; url='{{ page.extra.redirect }}'" />
|
||||
{%- endif -%}
|
||||
|
||||
{% block pre_content %}
|
||||
{% endblock pre_content %}
|
||||
<article>
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
{{ section.content | safe }}
|
||||
|
||||
{% if paginator %}
|
||||
{% set pages = paginator.pages %}
|
||||
{% else %}
|
||||
{% set pages = section.pages %}
|
||||
{% endif %}
|
||||
{%- if paginator -%}
|
||||
{%- set pages = paginator.pages -%}
|
||||
{%- else -%}
|
||||
{% set pages = section.pages -%}
|
||||
{%- endif -%}
|
||||
|
||||
<ul class="title-list">
|
||||
{%- for page in pages -%}
|
||||
|
@ -22,7 +22,12 @@
|
|||
{%- else -%}
|
||||
{% set datefmt = " @ %Y-%m-%dT%H:%M:%S%Z" %}
|
||||
{%- endif -%}
|
||||
<li><a href="{{ page.permalink | safe }}">{{ page.title }}
|
||||
{%- if page.extra.redirect -%}
|
||||
{%- set page_link = page.extra.redirect -%}
|
||||
{%- else -%}
|
||||
{%- set page_link = page.permalink -%}
|
||||
{%- endif -%}
|
||||
<li><a href="{{ page_link | safe }}">{{ page.title }}
|
||||
{%- if section.extra.show_subtitle and section.extra.show_subtitle == true and page.extra.subtitle -%}
|
||||
<span class="content-subtitle"> - {{ page.extra.subtitle }}</span>
|
||||
{%- endif -%}
|
||||
|
|
Loading…
Reference in a new issue