From ac6c0d8e8efb05c2365fa465a643b215746e7ac7 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Wed, 3 May 2017 18:23:38 +0200 Subject: [PATCH] Rename /impressum to /contact --- LICENSE.txt | 4 ++-- config.rb | 2 +- source/.htaccess.erb | 5 +++++ source/{impressum.md.erb => contact.md.erb} | 2 +- source/images/{impressum => contact}/cover.jpg | Bin source/layouts/layout.haml | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) rename source/{impressum.md.erb => contact.md.erb} (99%) rename source/images/{impressum => contact}/cover.jpg (100%) diff --git a/LICENSE.txt b/LICENSE.txt index aa07893..cf9326d 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,7 +1,7 @@ -Copyright (c) 2015 Holger Just +Copyright (c) 2015-2017 Holger Just This repository contains content licensed under various licenses depending on -the type and location of the content. Please see source.impressum.md.erb for +the type and location of the content. Please see source/contact.md.erb for details. The source code of this website (not including content covered by other diff --git a/config.rb b/config.rb index 27a86a4..596e466 100644 --- a/config.rb +++ b/config.rb @@ -131,7 +131,7 @@ set :casper, { navigation: { 'Home' => ->{ url_for '/index.html' }, 'About Me' => ->{ author_path }, - 'Contact' => -> { url_for '/impressum.html' } + 'Contact' => -> { url_for '/contact.html' } } } diff --git a/source/.htaccess.erb b/source/.htaccess.erb index 80fb23d..ef48964 100644 --- a/source/.htaccess.erb +++ b/source/.htaccess.erb @@ -56,6 +56,11 @@ RewriteRule .* https://<%= URI.parse(casper[:blog][:url]).host %>%{REQUEST_URI} RewriteRule ^favicon.ico$ /images/favicon.ico +# Persistent Rewrites +RewriteRule ^(.+/)?index.html$ /$1 [R=301,L] + +RewriteRule ^impressum/?$ /contact/ [R=301,L] + # Use gziped content if possible RewriteCond %{HTTP:Accept-Encoding} \b(x-)?gzip\b RewriteCond %{REQUEST_FILENAME}\.gz -s diff --git a/source/impressum.md.erb b/source/contact.md.erb similarity index 99% rename from source/impressum.md.erb rename to source/contact.md.erb index 60cf567..0bf2803 100644 --- a/source/impressum.md.erb +++ b/source/contact.md.erb @@ -2,7 +2,7 @@ title: Contact lang: :en layout: page -cover: impressum/cover.jpg +cover: contact/cover.jpg cover_license: '[Cover Image](https://unsplash.com/photos/P4w-HvqTPoM) by [Shaun Bell](https://unsplash.com/@shauncolinbell), [CC Zero 1.0](https://unsplash.com/license)' --- diff --git a/source/images/impressum/cover.jpg b/source/images/contact/cover.jpg similarity index 100% rename from source/images/impressum/cover.jpg rename to source/images/contact/cover.jpg diff --git a/source/layouts/layout.haml b/source/layouts/layout.haml index 730738f..4bfce60 100644 --- a/source/layouts/layout.haml +++ b/source/layouts/layout.haml @@ -53,7 +53,7 @@ © 2006 - = Time.now.year | - = link_to 'Impressum | Contact | Legal', '/impressum/' + = link_to 'Contact | Impressum | Legal', '/contact.html' %section.license = partial("licenses/#{current_page.data.license || blog_settings.default_license}") - if current_page.data.cover_license.present?