diff --git a/_data/i18n/en.yml b/_data/i18n/en.yml index 56ff275..d7fd7ad 100644 --- a/_data/i18n/en.yml +++ b/_data/i18n/en.yml @@ -29,3 +29,5 @@ global_pages: text: Short pages - url: /Special:ListUsers text: All the users + - url: /Special:ListRedirects + text: Redirects diff --git a/_data/i18n/fr.yml b/_data/i18n/fr.yml index 4437bab..fcc6c78 100644 --- a/_data/i18n/fr.yml +++ b/_data/i18n/fr.yml @@ -29,3 +29,5 @@ global_pages: text: Pages courtes - url: /Special:ListUsers text: Tous les utilisateurs + - url: /Special:ListRedirects + text: Redirections diff --git a/_global/Special:ListRedirects.html b/_global/Special:ListRedirects.html new file mode 100644 index 0000000..64c1e11 --- /dev/null +++ b/_global/Special:ListRedirects.html @@ -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' -%} + + diff --git a/_includes/functions/redirect-page.html b/_includes/functions/redirect-page.html index 0a50bd9..f812601 100644 --- a/_includes/functions/redirect-page.html +++ b/_includes/functions/redirect-page.html @@ -1,7 +1,14 @@ {%- include /functions/wiki-pages.html -%} -{%- assign redirect = page.redirect | liquify -%} + +{%- if include.page -%} + {%- assign source_page = include.source_page -%} +{%- else -%} + {%- assign source_page = page -%} +{%- endif -%} + +{%- assign redirect = source_page.redirect | liquify -%} {%- for other_page in wiki_pages -%} - {%- if other_page.slug == redirect -%} + {%- if other_page.id == redirect -%} {%- assign redirect_page = other_page -%} {%- endif -%} {%- endfor -%} diff --git a/_includes/tags.html b/_includes/tags.html index d28489b..dcf6e02 100644 --- a/_includes/tags.html +++ b/_includes/tags.html @@ -8,7 +8,7 @@
  • {{ tag }}