Issue #7 List of redirections

This commit is contained in:
Alexis Hassler
2019-05-17 13:45:29 +02:00
parent a9c6585252
commit e9ee1f40d4
7 changed files with 39 additions and 10 deletions

View File

@@ -0,0 +1,21 @@
---
layout: default
title: Redirects
menu: ['global']
---
{%- include /functions/wiki-pages.html -%}
{%- assign redirect_pages = site.special | where_exp: 'page', 'page.redirect' -%}
<ul>
{%- for source_page in redirect_pages -%}
<li>
{%- assign redirect = source_page.redirect | liquify | prepend: '/' -%}
{%- for other_page in wiki_pages -%}
{%- if other_page.id == redirect -%}
{%- assign redirect_page = other_page -%}
{%- endif -%}
{%- endfor -%}
<a href="{{ source_page.url }}.html">{{ source_page.id }}</a><a href="{{ redirect_page.url }}.html">{{ redirect_page.title }}</a>
</li>
{%- endfor -%}
</ul>