forked from rubyberlin/rubyberlin.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
42 lines (36 loc) · 996 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require 'bundler/setup'
require 'psych'
require 'yaml'
require 'heroku_san'
namespace :assets do
task :precompile do
sh 'middleman build'
end
end
module HerokuSan::Deploy
class RubyBerlin < Sinatra
def deploy
super
#@stage.rake('utils:update_sitemap')
end
end
end
config_file = File.join(File.expand_path(File.dirname(__FILE__)), 'config', 'heroku.yml')
HerokuSan.project = HerokuSan::Project.new(config_file, :deploy => HerokuSan::Deploy::RubyBerlin)
load 'heroku_san/tasks.rb'
require 'nokogiri'
require 'open-uri'
require 'yaml'
require 'sitemap_generator'
namespace :utils do
desc "Update sitemap"
task :update_sitemap do
SitemapGenerator::Sitemap.default_host = 'http://rubyberlin.org'
SitemapGenerator::Sitemap.public_path = "source"
SitemapGenerator::Sitemap.create do
add '/', :changefreq => 'hourly'
add '/imprint', :changefreq => 'weekly'
end
SitemapGenerator::Sitemap.ping_search_engines
end
end