From 164a4c2a9a9dc5d7a29a46a0acd844b8e324c3d4 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sun, 31 Aug 2014 18:55:02 +0200 Subject: [PATCH] handle old content redirects with jekyll-redirect-from plugin --- Gemfile | 1 + _config.yml | 4 +-- _src/.htaccess | 35 +------------------ _src/_includes/comments.html | 2 +- _src/_includes/head.html | 6 ++-- _src/_includes/opengraph.html | 8 ++--- _src/_includes/twittercards.html | 6 ++-- _src/_posts/2008-04-04-aperture-file-types.md | 5 +++ _src/_posts/2008-06-01-chives.md | 6 ++-- ...and-the-history-of-the-first-photograph.md | 11 ++++-- ...3-niepces-camera-obscura-wallpaper-pack.md | 3 ++ ...mac-file-server-and-time-machine-volume.md | 3 ++ _src/_posts/2008-08-26-icy-box-icons.md | 3 ++ ...9-23-futurama-mars-university-wallpaper.md | 7 ++-- _src/about/index.html | 3 ++ _src/design/index.html | 3 ++ _src/feed/index.xml | 18 ++++++---- _src/goodies/index.html | 5 +++ _src/index.html | 6 ++++ _src/robots.txt | 2 +- 20 files changed, 75 insertions(+), 62 deletions(-) diff --git a/Gemfile b/Gemfile index a47bef38..49421e8b 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ group :development do gem 'jekyll' gem 'jekyll-sitemap' gem 'jekyll-timeago' + gem 'jekyll-redirect-from' gem 'rouge' gem 'mini_magick' gem 'fileutils' diff --git a/_config.yml b/_config.yml index 84d02dec..34608d5b 100644 --- a/_config.yml +++ b/_config.yml @@ -12,7 +12,7 @@ name: kremalicious description: 'Blog of designer & developer Matthias Kretschmann' -url: http://kremalicious.com +baseurl: http://kremalicious.com author: Matthias Kretschmann email: m@kretschmann.io @@ -53,7 +53,7 @@ keep_files: ['media', 'gen'] gems: - jekyll-sitemap - jekyll-timeago - + - jekyll-redirect-from # jekyll-picture-tag # -------------------- diff --git a/_src/.htaccess b/_src/.htaccess index fcd5b11a..53569991 100644 --- a/_src/.htaccess +++ b/_src/.htaccess @@ -662,45 +662,12 @@ FileETag None -# feed redirects -Redirect 301 /home/feed/ /feed/ -Redirect 301 /feed/atom/ /feed/ -Redirect 301 /comments/feed/ /feed/ - # Remove date from post permalinks RedirectMatch 301 ^/([0-9]+)/([0-9]+)/(.*)$ /$3 # Old Content Redirects -Redirect 301 /goodies/icon /goodies -Redirect 301 /goodies/other /goodies -Redirect 301 /goodies/wallpaper /goodies Redirect 301 /lab http://lab.kremalicious.com Redirect 301 /csspaperstack /lab/csspaperstack Redirect 301 /download /media -Redirect 301 /about/contact /about -Redirect 301 /contact /about -Redirect 301 /portfolio http://matthiaskretschmann.com -Redirect 301 /blog / -Redirect 301 /topics/goodies /goodies -Redirect 301 /topics/design-articles /design -Redirect 301 /topics/howto-and-tutorial / -Redirect 301 /topics/news-and-links /links -Redirect 301 /design-articles /design -Redirect 301 /howto-and-tutorial / -Redirect 301 /news-and-links /links - -Redirect 301 /new-goodies-aperture-file-types-icons /aperture-file-types -Redirect 301 /goodie-updated-aperture-file-types-v11 /aperture-file-types -Redirect 301 /aperture-file-types-v12-released /aperture-file-types -Redirect 301 /new-goodie-niepces-camera-obscura-wallpaper-pack /niepces-camera-obscura-wallpaper-pack -Redirect 301 /new-goodie-icy-box-icons /icy-box-icons -Redirect 301 /new-goodie-futurama-mars-university-wallpaper /futurama-mars-university-wallpaper -Redirect 301 /first-wallpaper-chives /chives -Redirect 301 /new-goodie-niepces-camera-obscura-and-the-history-of-the-first-photograph /niepces-camera-obscura-and-the-history-of-the-first-photograph -Redirect 301 /4-more-icons-niepces-camera-obscura-v11 /niepces-camera-obscura-and-the-history-of-the-first-photograph -Redirect 301 /canon-eos-50d-officially-announced-and-new-lens / -Redirect 301 /apple-touch-icon.png /apple-touch-icon-precomposed.png - -Redirect 301 /most-popular-stuff-on-kremaliciouscom-in-2008/ / -Redirect 301 /ubuntu-as-mac-file-server-and-time-machine-volume/trackback/ /ubuntu-as-mac-file-server-and-time-machine-volume +Redirect 301 /portfolio http://matthiaskretschmann.com \ No newline at end of file diff --git a/_src/_includes/comments.html b/_src/_includes/comments.html index ed924a9e..f446be88 100644 --- a/_src/_includes/comments.html +++ b/_src/_includes/comments.html @@ -2,6 +2,6 @@ \ No newline at end of file diff --git a/_src/_includes/head.html b/_src/_includes/head.html index e96d17f6..894b35bf 100644 --- a/_src/_includes/head.html +++ b/_src/_includes/head.html @@ -67,9 +67,9 @@ - + - + @@ -87,7 +87,7 @@ - + {% if paginator %} diff --git a/_src/_includes/opengraph.html b/_src/_includes/opengraph.html index bfe6401a..0bf01db1 100644 --- a/_src/_includes/opengraph.html +++ b/_src/_includes/opengraph.html @@ -7,7 +7,7 @@ {% endif %} {% if page.title %} - + {% else %} {% endif %} @@ -19,15 +19,15 @@ {% endif %} {% if page.url %} - + {% endif %} {% if page.date %} {% endif %} {% if page.image %} - + {% else %} - + {% endif %} {% if page.categories %} {% for category in page.categories limit:1 %} diff --git a/_src/_includes/twittercards.html b/_src/_includes/twittercards.html index b92fa12d..81c5f9b7 100644 --- a/_src/_includes/twittercards.html +++ b/_src/_includes/twittercards.html @@ -12,7 +12,7 @@ {% endif %} {% if page.url %} - + {% endif %} {% if page.description %} @@ -20,7 +20,7 @@ {% endif %} {% if page.image %} - + {% else %} - + {% endif %} \ No newline at end of file diff --git a/_src/_posts/2008-04-04-aperture-file-types.md b/_src/_posts/2008-04-04-aperture-file-types.md index 65ff4379..d8d2f9ff 100644 --- a/_src/_posts/2008-04-04-aperture-file-types.md +++ b/_src/_posts/2008-04-04-aperture-file-types.md @@ -11,6 +11,11 @@ wordpress_id: 21 categories: - goodies - icon + +redirect_from: + - /new-goodies-aperture-file-types-icons/ + - /goodie-updated-aperture-file-types-v11/ + - /aperture-file-types-v12-released/ --- These icons are free for your personal use and include icons for all file types Apple’s Aperture 2.0 can handle (.jpeg, .gif, .tiff, .png, .pdf, .psd, .arw, .cr2, .crw, .mos, .nef, .raf, .raw, .srw, .tif, .oly, .fff, .3fr, .dng, .mrw, .pef, .srf, .orf). diff --git a/_src/_posts/2008-06-01-chives.md b/_src/_posts/2008-06-01-chives.md index 4ef1207c..f9ca3733 100644 --- a/_src/_posts/2008-06-01-chives.md +++ b/_src/_posts/2008-06-01-chives.md @@ -9,8 +9,10 @@ author: Matthias Kretschmann date: 2008-06-01 18:43:40+00:00 wordpress_id: 64 categories: -- goodies -- wallpaper + - goodies + - wallpaper +redirect_from: + - /first-wallpaper-chives/ --- I have added my first wallpaper to the Goodies section on this website. It's a shot of blooming chives which was altered with Aperture 2.1 and Photoshop CS3. diff --git a/_src/_posts/2008-06-03-niepces-camera-obscura-and-the-history-of-the-first-photograph.md b/_src/_posts/2008-06-03-niepces-camera-obscura-and-the-history-of-the-first-photograph.md index 913b2682..1b6e1c83 100644 --- a/_src/_posts/2008-06-03-niepces-camera-obscura-and-the-history-of-the-first-photograph.md +++ b/_src/_posts/2008-06-03-niepces-camera-obscura-and-the-history-of-the-first-photograph.md @@ -8,10 +8,15 @@ author: Matthias Kretschmann date: 2008-06-03 14:34:03+00:00 wordpress_id: 67 + categories: -- goodies -- icon -- photography + - goodies + - icon + - photography + +redirect_from: + - /new-goodie-niepces-camera-obscura-and-the-history-of-the-first-photograph/ + -/4-more-icons-niepces-camera-obscura-v11 --- These two desktop icons show the Camera Obscura as it was used by Nicéphore Niépce in an Aperture and iPhoto style and are intended as an homage to him. Nicéphore Niépce made it first possible to preserve an image taken with a camera obscura in 1826 or 1827 by using a special mixture of bitumen on a pewter plate, naming it Heliography. This first preserved photograph "View from the Window at Le Gras" is the one you can see in the iPhoto icon contained in this package. The third icon is the folder icon I have created for this icon package. diff --git a/_src/_posts/2008-06-03-niepces-camera-obscura-wallpaper-pack.md b/_src/_posts/2008-06-03-niepces-camera-obscura-wallpaper-pack.md index 2bcab602..d49ab403 100644 --- a/_src/_posts/2008-06-03-niepces-camera-obscura-wallpaper-pack.md +++ b/_src/_posts/2008-06-03-niepces-camera-obscura-wallpaper-pack.md @@ -11,6 +11,9 @@ wordpress_id: 66 categories: - goodies - wallpaper + +redirect_from: + - /new-goodie-niepces-camera-obscura-wallpaper-pack/ --- In addition to my Niépce's Camera Obscura icons for Aperture and iPhoto I have made some Wallpapers containing both icons. diff --git a/_src/_posts/2008-06-19-ubuntu-as-mac-file-server-and-time-machine-volume.md b/_src/_posts/2008-06-19-ubuntu-as-mac-file-server-and-time-machine-volume.md index f7c15cb0..efad5751 100644 --- a/_src/_posts/2008-06-19-ubuntu-as-mac-file-server-and-time-machine-volume.md +++ b/_src/_posts/2008-06-19-ubuntu-as-mac-file-server-and-time-machine-volume.md @@ -13,6 +13,9 @@ categories: - design tags: - tutorial + +redirect_from: + - /ubuntu-as-mac-file-server-and-time-machine-volume/trackback/ --- ![Ubuntu Mac File Server Connectivity](/media/ubuntu_mac_feature_thumb.jpg)For quite some time I use my Ubuntu machine as a file and backup server for all Macs in my network which is perfectly accessible from the Finder in Mac OS X. There are some instructions available in the web for this task but all failed in my case so I wrote my own tutorial with all the steps needed for it to work properly. diff --git a/_src/_posts/2008-08-26-icy-box-icons.md b/_src/_posts/2008-08-26-icy-box-icons.md index 8a16896b..b7f6ec8e 100644 --- a/_src/_posts/2008-08-26-icy-box-icons.md +++ b/_src/_posts/2008-08-26-icy-box-icons.md @@ -10,6 +10,9 @@ wordpress_id: 146 categories: - goodies - icon + +redirect_from: + - /new-goodie-icy-box-icons/ --- A friend of mine asked me to craft an icon for his external hard drive case and I would like to share those with you too. These desktop icons show the the silver and black Icy Box external aluminium case with USB interface and are intended as a replacement for the generic external hard disk icon in Mac OS X Leopard. diff --git a/_src/_posts/2008-09-23-futurama-mars-university-wallpaper.md b/_src/_posts/2008-09-23-futurama-mars-university-wallpaper.md index 3c56cf0c..0f11989b 100644 --- a/_src/_posts/2008-09-23-futurama-mars-university-wallpaper.md +++ b/_src/_posts/2008-09-23-futurama-mars-university-wallpaper.md @@ -8,8 +8,11 @@ author: Matthias Kretschmann date: 2008-09-23 23:22:16+00:00 wordpress_id: 256 categories: -- goodies -- wallpaper + - goodies + - wallpaper + +redirect_from: + - /new-goodie-futurama-mars-university-wallpaper/ --- Show your geeky love for extraterrestrial universities! This is a simple Futurama tribute wallpaper displaying the logo of the Mars University as seen in the first season (1ACV11/S02E02). But I've modified it a bit to get it out of the 2D. Including one high-resolution desktop version for widescreen displays (2560x1600) and one iPhone version (320x480). diff --git a/_src/about/index.html b/_src/about/index.html index ab526287..12bdeeb2 100644 --- a/_src/about/index.html +++ b/_src/about/index.html @@ -2,6 +2,9 @@ layout: page title: About description: About this blog and the author +redirect_from: + - /about/contact/ + - /contact/ --- diff --git a/_src/design/index.html b/_src/design/index.html index 86481199..56f48001 100644 --- a/_src/design/index.html +++ b/_src/design/index.html @@ -3,6 +3,9 @@ layout: base title: Design description: All the design related articles, mostly about web/ui design & front-end development category: design +redirect_from: + - /topics/design-articles/ + - /design-articles/ ---
diff --git a/_src/feed/index.xml b/_src/feed/index.xml index b77253b3..92aa85c8 100644 --- a/_src/feed/index.xml +++ b/_src/feed/index.xml @@ -1,13 +1,17 @@ --- +redirect_from: + - /home/feed/ + - /feed/atom/ + - /comments/feed/ --- {{ site.name }} - - + + {{ site.time | date_to_xmlschema }} - {{ site.url }} + {{ site.baseurl }} {{ site.author }} @@ -19,7 +23,7 @@ {{ post.linkurl | escape }} {% else %} {{ post.title | escape | titlecase }} - {{ site.url }}{{ post.url | escape }} + {{ site.baseurl }}{{ post.url | escape }} {% endif %} {{ post.date | date_to_xmlschema }} @@ -30,17 +34,17 @@ {{ post.date | date_to_xmlschema }} {% endif %} - {{ site.url }}{{ post.url | escape }} + {{ site.baseurl }}{{ post.url | escape }} {% if post.image %} - <img src="{{ site.url }}/media/{{ post.image }}" /> + <img src="{{ site.baseurl }}/media/{{ post.image }}" /> {% endif %} {{ post.content | xml_escape }} {% if post.layout == "link" %} <a href="{{ post.linkurl | escape }}">Go to source &#187;</a> <br /> - <a href="{{ site.url }}{{ post.url | escape }}" title="Permalink for this post">&#8734;</a> + <a href="{{ site.baseurl }}{{ post.url | escape }}" title="Permalink for this post">&#8734;</a> {% endif %} <hr /> diff --git a/_src/goodies/index.html b/_src/goodies/index.html index 23892ede..96cb28d1 100644 --- a/_src/goodies/index.html +++ b/_src/goodies/index.html @@ -3,6 +3,11 @@ layout: base title: Goodies description: All the goodies I've released for you to download. Those are all free for your personal use only, licensed under CC BY NC SA 3.0. Please contact me if you want to use them commercially. category: goodies +redirect_from: + - /goodies/icon/ + - /goodies/other/ + - /goodies/wallpaper/ + - /topics/goodies/ ---
diff --git a/_src/index.html b/_src/index.html index 055b496e..ddef8795 100644 --- a/_src/index.html +++ b/_src/index.html @@ -1,6 +1,12 @@ --- layout: base front_page: true +redirect_from: + - /blog/ + - /topics/howto-and-tutorial/ + - /howto-and-tutorial/ + - /most-popular-stuff-on-kremaliciouscom-in-2008/ + - /canon-eos-50d-officially-announced-and-new-lens/ --- {% if paginator.next_page == 2 %} diff --git a/_src/robots.txt b/_src/robots.txt index 18cc5990..0bde4337 100644 --- a/_src/robots.txt +++ b/_src/robots.txt @@ -6,4 +6,4 @@ Disallow: /search/ Disallow: /page/ Disallow: /*/page/ -Sitemap: {{ site.url }}/sitemap.xml \ No newline at end of file +Sitemap: {{ site.baseurl }}/sitemap.xml \ No newline at end of file