From dc1f37283b342d554ba0e5c9e6dc0030e9182a31 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 26 Dec 2013 18:17:33 +0100 Subject: [PATCH] fix sitemap and some 404s --- _src/.htaccess | 5 +++++ _src/_plugins/sitemap_generator.rb | 6 +++--- _src/robots.txt | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/_src/.htaccess b/_src/.htaccess index 6e030649..b9f88f64 100644 --- a/_src/.htaccess +++ b/_src/.htaccess @@ -669,10 +669,15 @@ Redirect 301 /home/feed/ /feed/ 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 diff --git a/_src/_plugins/sitemap_generator.rb b/_src/_plugins/sitemap_generator.rb index c4eef927..f9e47847 100644 --- a/_src/_plugins/sitemap_generator.rb +++ b/_src/_plugins/sitemap_generator.rb @@ -46,7 +46,7 @@ module Jekyll SITEMAP_FILE_NAME = "sitemap.xml" # Any files to exclude from being included in the sitemap.xml - EXCLUDED_FILES = ["feed.xml"] + EXCLUDED_FILES = ["index.xml", "robots.txt", "search.json"] # Any files that include posts, so that when a new post is added, the last # modified date of these pages should take that into account @@ -66,7 +66,7 @@ module Jekyll end def location_on_server - "#{site.config['url']}#{url}" + "#{site.config['url']}#{url}/" end end @@ -78,7 +78,7 @@ module Jekyll end def location_on_server - location = "#{site.config['url']}#{@dir}#{url}" + location = "#{site.config['url']}#{url}" location.gsub(/index.html$/, "") end end diff --git a/_src/robots.txt b/_src/robots.txt index 3be6f047..18cc5990 100644 --- a/_src/robots.txt +++ b/_src/robots.txt @@ -1,3 +1,6 @@ +--- +--- + User-agent: * Disallow: /search/ Disallow: /page/