From 61ef9ee3dade404c2eb3fec6718292f8e41108bd Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Tue, 12 Jul 2011 22:14:02 -0700 Subject: [PATCH] prep custom 404 --- features/{w_asset_host.feature => v_asset_host.feature} | 0 ..._image_sizes.feature => w_automatic_image_sizes.feature} | 0 features/{y_cache_buster.feature => x_cache_buster.feature} | 0 ...{z_relative_assets.feature => y_relative_assets.feature} | 0 lib/middleman/server.rb | 6 ++++++ 5 files changed, 6 insertions(+) rename features/{w_asset_host.feature => v_asset_host.feature} (100%) rename features/{x_automatic_image_sizes.feature => w_automatic_image_sizes.feature} (100%) rename features/{y_cache_buster.feature => x_cache_buster.feature} (100%) rename features/{z_relative_assets.feature => y_relative_assets.feature} (100%) diff --git a/features/w_asset_host.feature b/features/v_asset_host.feature similarity index 100% rename from features/w_asset_host.feature rename to features/v_asset_host.feature diff --git a/features/x_automatic_image_sizes.feature b/features/w_automatic_image_sizes.feature similarity index 100% rename from features/x_automatic_image_sizes.feature rename to features/w_automatic_image_sizes.feature diff --git a/features/y_cache_buster.feature b/features/x_cache_buster.feature similarity index 100% rename from features/y_cache_buster.feature rename to features/x_cache_buster.feature diff --git a/features/z_relative_assets.feature b/features/y_relative_assets.feature similarity index 100% rename from features/z_relative_assets.feature rename to features/y_relative_assets.feature diff --git a/lib/middleman/server.rb b/lib/middleman/server.rb index 88527c90..9bc913d5 100644 --- a/lib/middleman/server.rb +++ b/lib/middleman/server.rb @@ -85,6 +85,12 @@ module Middleman process_request end + # Custom 404 handler (to be styled) + error Sinatra::NotFound do + content_type 'text/html' + "

File Not Found

" + end + # See if Tilt cannot handle this file before do result = resolve_template(request.path_info, :raise_exceptions => false)