<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lasse Bunk&#039;s weblog &#187; Google</title>
	<atom:link href="http://lassebunk.dk/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://lassebunk.dk</link>
	<description>Ruby on Rails, programming, and SEO</description>
	<lastBuildDate>Sat, 04 Feb 2012 12:51:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sitemap Notifier: Ruby on Rails plugin for notifying search engines of changes to sitemap</title>
		<link>http://lassebunk.dk/2011/09/18/sitemap-notifier/</link>
		<comments>http://lassebunk.dk/2011/09/18/sitemap-notifier/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 19:08:16 +0000</pubDate>
		<dc:creator>lassebunk</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Bing]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Sitemaps]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://lassebunk.dk/?p=2004</guid>
		<description><![CDATA[Ruby on Rails plugin that automatically notifies Google, Bing, and Yahoo when your models change.]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/lassebunk/sitemap_notifier">Sitemap Notifier</a> is a <a href="http://rubyonrails.org">Ruby on Rails</a> plugin that, when installed, automatically notifies <a href="http://www.google.com">Google</a>, <a href="http://www.bing.com">Bing</a>, and <a href="http://www.yahoo.com">Yahoo</a> of changes to your models, i.e. changes to your <a href="http://www.sitemaps.org/">sitemap</a>. It also works in conjunction with the <a href="http://lassebunk.dk/2010/10/29/ruby-on-rails-sitemap-plugin/">Dynamic Sitemaps</a> plugin.</p>
<h3>Installation</h3>
<p>In Rails 3:</p>
<pre class="brush: bash; title: ; notranslate">
$ rails plugin install git://github.com/lassebunk/sitemap_notifier.git
</pre>
<h3>Example</h3>
<p>Start by generating initializer and route:</p>
<pre class="brush: bash; title: ; notranslate">
$ rails generate sitemap_notifier sitemap_notifier
</pre>
<p>In config/initializers/sitemap_notifier.rb:</p>
<pre class="brush: ruby; title: ; notranslate">
# wait 10 minutes between notifications
SitemapNotifier::Notifier.delay = 600

# replace this with your own url
SitemapNotifier::Notifier.sitemap_url = &quot;http://example.com/sitemap.xml&quot;
</pre>
<h3>After installation</h3>
<p>After you install and configure the plugin, it’ll automatically notify Google, Bing, and Yahoo every time you update a model. After each notification, it’ll wait 10 minutes (by default) before notifying again. This is to ensure that for example a batch update won’t trigger an equal amount of notifications.</p>
<p>
<a href="http://twitter.com/lassebunk" onclick="abtest.trackGoal(21, this);" class="icon twitter">Follow me on Twitter</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://lassebunk.dk/2011/09/18/sitemap-notifier/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dynamic Sitemaps: Ruby on Rails sitemap plugin</title>
		<link>http://lassebunk.dk/2010/10/29/ruby-on-rails-sitemap-plugin/</link>
		<comments>http://lassebunk.dk/2010/10/29/ruby-on-rails-sitemap-plugin/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 16:15:53 +0000</pubDate>
		<dc:creator>lassebunk</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Bing]]></category>
		<category><![CDATA[Generator]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Sitemaps]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://lassebunk.dk/?p=1309</guid>
		<description><![CDATA[Ruby on Rails plugin for creating dynamic sitemaps.]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/lassebunk/dynamic_sitemaps">Dynamic Sitemaps</a> enables you to easily create flexible, dynamic sitemaps in <a href="http://rubyonrails.org">Ruby on Rails</a>. It generates sitemaps in the <a href="http://sitemaps.org">sitemaps.org</a> standard which is supported by several crawlers including <a href="http://google.com">Google</a>, <a href="http://bing.com">Bing</a>, and <a href="http://yahoo.com">Yahoo</a>. If the sitemap has more than 50.000 urls – or whatever you set it to using <code>per_page</code> – the plugin will automatically split the sitemap into smaller chunks and generate a sitemap index as specified at sitemaps.org.</p>
<p>To install in Rails 3:</p>
<pre class="brush: bash; title: ; notranslate">
rails plugin install git://github.com/lassebunk/dynamic_sitemaps.git
</pre>
<p>Generate initializer and route:</p>
<pre class="brush: bash; title: ; notranslate">
$ rails generate dynamic_sitemaps sitemap.xml
</pre>
<p>In <code>config/initializers/sitemap.rb</code>:</p>
<pre class="brush: ruby; title: ; notranslate">
Sitemap::Map.draw do

  # default page size is 50.000 which is the specified maximum at http://sitemaps.org.
  per_page 10

  url root_url, :last_mod =&gt; DateTime.now, :change_freq =&gt; 'daily', :priority =&gt; 1

  new_page!

  Product.all.each do |product|
    url product_url(product), :last_mod =&gt; product.updated_at, :change_freq =&gt; 'monthly', :priority =&gt; 0.8
  end

  new_page!

  autogenerate  :products, :categories,
                :last_mod =&gt; :updated_at,
                :change_freq =&gt; 'monthly',
                :priority =&gt; 0.8

  new_page!

  autogenerate  :users,
                :last_mod =&gt; :updated_at,
                :change_freq =&gt; lambda { |user| user.very_active? ? 'weekly' : 'monthly' },
                :priority =&gt; 0.5

end
</pre>
<p>You are now able to access your sitemap at <a href="http://yourdomain.com/sitemap.xml">http://yourdomain.com/sitemap.xml</a>.</p>
<p>In <code>public/robots.txt</code>:</p>
<pre class="brush: plain; title: ; notranslate">
Sitemap: http://yourdomain.com/sitemap.xml
</pre>
<p>And at last submit it to <a href="http://www.google.com/webmasters/">Google</a>, <a href="http://www.bing.com/toolbox/webmasters/">Bing</a>, and <a href="http://siteexplorer.search.yahoo.com/">Yahoo</a>.</p>
<p>If you want to notify search engines with changes to your sitemap, see the <a href="http://lassebunk.dk/2011/09/18/sitemap-notifier/">Sitemap Notifier</a> plugin.</p>
<p>
<a href="http://twitter.com/lassebunk" onclick="abtest.trackGoal(21, this);" class="icon twitter">Follow me on Twitter</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://lassebunk.dk/2010/10/29/ruby-on-rails-sitemap-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

