Add XML sitemap

This commit is contained in:
Erik Michaels-Ober 2011-03-06 12:16:10 -08:00
parent 51c4a8df37
commit 41e4303efb
6 changed files with 16 additions and 3 deletions

View File

@ -0,0 +1,6 @@
class SitemapsController < ApplicationController
respond_to :xml
def index
end
end

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://<%= request.env["HTTP_HOST"] %>/</loc>
</url>
</urlset>

View File

@ -23,6 +23,6 @@ AdoptAHydrant::Application.configure do
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.default_url_options = {:host => 'localhost:3000'}
end

View File

@ -47,5 +47,5 @@ AdoptAHydrant::Application.configure do
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.default_url_options = {:host => 'localhost:3000'}
end

View File

@ -33,5 +33,5 @@ AdoptAHydrant::Application.configure do
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
config.action_mailer.default_url_options = { :host => 'adopt-a-hydrant.heroku.com' }
config.action_mailer.default_url_options = {:host => 'adoptahydrant.com'}
end

View File

@ -4,5 +4,6 @@ AdoptAHydrant::Application.routes.draw do
:sessions => 'sessions'
}
resource :user
get 'sitemap(.format)' => 'sitemaps#index', :as => 'sitemap'
root :to => 'main#index'
end