From c8424e50c7f19da05274058d022f01a42ccc11a7 Mon Sep 17 00:00:00 2001 From: Thomas Jensen Date: Tue, 17 Mar 2015 17:46:34 +0100 Subject: [PATCH] Extract redirection features for old URLs from 'default' into a new 'redirect' layout --- _includes/header.html | 9 +-------- _layouts/default.html | 12 ------------ _layouts/redirect.html | 20 ++++++++++++++++++++ boxes.shtml | 2 +- docs/config-complete_exp.shtml | 2 +- docs/config-general.shtml | 2 +- docs/config-step.shtml | 2 +- docs/config-syntax.shtml | 2 +- docs/faq.shtml | 2 +- docs/filters.shtml | 2 +- docs/index.shtml | 2 +- docs/install.shtml | 2 +- docs/legal.shtml | 2 +- 13 files changed, 31 insertions(+), 30 deletions(-) create mode 100644 _layouts/redirect.html diff --git a/_includes/header.html b/_includes/header.html index 5cf2a0a..4b13baf 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -5,10 +5,6 @@ {{ site.name }} - {% if page.title | size > 0 %}{{ page.title }}{% else %}{{ site.description }}{% endif %} - {% if page.redirect %} - - - {% else %} {% if page.sedesc %} @@ -38,12 +34,10 @@ - {% endif %} -{% if page.redirect %}{% else %}
-{% endif %} diff --git a/_layouts/default.html b/_layouts/default.html index 4451bab..8d8cd98 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,15 +1,4 @@ {% include header.html %} -{% if page.redirect %} -
-This page has moved to {{ page.redirect }}. - -

Please update your bookmarks. -

- - - -{% else %} -
{% include footer.html %} -{% endif %} diff --git a/_layouts/redirect.html b/_layouts/redirect.html new file mode 100644 index 0000000..2a9bbe1 --- /dev/null +++ b/_layouts/redirect.html @@ -0,0 +1,20 @@ + + + + + + {{ site.name }} - Moved content + + + + + + + +
+

This page has moved to {{ page.redirect }}.

+

Please update your bookmarks.

+
+ + + diff --git a/boxes.shtml b/boxes.shtml index d10b7e3..3f7f85c 100644 --- a/boxes.shtml +++ b/boxes.shtml @@ -1,4 +1,4 @@ --- -layout: default +layout: redirect redirect: / --- diff --git a/docs/config-complete_exp.shtml b/docs/config-complete_exp.shtml index 9450612..2dfea6e 100644 --- a/docs/config-complete_exp.shtml +++ b/docs/config-complete_exp.shtml @@ -1,4 +1,4 @@ --- -layout: default +layout: redirect redirect: config-complete_exp.html --- diff --git a/docs/config-general.shtml b/docs/config-general.shtml index 7ac3513..ad5e50f 100644 --- a/docs/config-general.shtml +++ b/docs/config-general.shtml @@ -1,4 +1,4 @@ --- -layout: default +layout: redirect redirect: config-general.html --- diff --git a/docs/config-step.shtml b/docs/config-step.shtml index 06ad642..05af578 100644 --- a/docs/config-step.shtml +++ b/docs/config-step.shtml @@ -1,4 +1,4 @@ --- -layout: default +layout: redirect redirect: config-step.html --- diff --git a/docs/config-syntax.shtml b/docs/config-syntax.shtml index d6104df..fcc68af 100644 --- a/docs/config-syntax.shtml +++ b/docs/config-syntax.shtml @@ -1,4 +1,4 @@ --- -layout: default +layout: redirect redirect: config-syntax.html --- diff --git a/docs/faq.shtml b/docs/faq.shtml index da4558d..7177290 100644 --- a/docs/faq.shtml +++ b/docs/faq.shtml @@ -1,4 +1,4 @@ --- -layout: default +layout: redirect redirect: faq.html --- diff --git a/docs/filters.shtml b/docs/filters.shtml index 82ba83d..023a48e 100644 --- a/docs/filters.shtml +++ b/docs/filters.shtml @@ -1,4 +1,4 @@ --- -layout: default +layout: redirect redirect: filters.html --- diff --git a/docs/index.shtml b/docs/index.shtml index 3fc1f29..957aa01 100644 --- a/docs/index.shtml +++ b/docs/index.shtml @@ -1,4 +1,4 @@ --- -layout: default +layout: redirect redirect: index.html --- diff --git a/docs/install.shtml b/docs/install.shtml index a0cb3f7..971af5f 100644 --- a/docs/install.shtml +++ b/docs/install.shtml @@ -1,4 +1,4 @@ --- -layout: default +layout: redirect redirect: install.html --- diff --git a/docs/legal.shtml b/docs/legal.shtml index 5ed4f21..2dcb9e7 100644 --- a/docs/legal.shtml +++ b/docs/legal.shtml @@ -1,4 +1,4 @@ --- -layout: default +layout: redirect redirect: legal.html ---