Add sitemap

This commit is contained in:
Hakan Ensari 2018-10-09 15:55:20 +01:00
parent 200d10122a
commit 63b898571d
6 changed files with 21 additions and 0 deletions

View File

@ -17,6 +17,7 @@ gem 'unicorn'
group :development do group :development do
gem 'shotgun' gem 'shotgun'
gem 'sitemap_generator'
end end
group :development, :test do group :development, :test do

View File

@ -4,6 +4,7 @@ GEM
addressable (2.5.2) addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0) public_suffix (>= 2.0.2, < 4.0)
ast (2.4.0) ast (2.4.0)
builder (3.2.3)
coderay (1.1.2) coderay (1.1.2)
crack (0.4.3) crack (0.4.3)
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
@ -74,6 +75,8 @@ GEM
rack (~> 2.0) rack (~> 2.0)
rack-protection (= 2.0.4) rack-protection (= 2.0.4)
tilt (~> 2.0) tilt (~> 2.0)
sitemap_generator (6.0.1)
builder (~> 3.0)
thread_safe (0.3.6) thread_safe (0.3.6)
tilt (2.0.8) tilt (2.0.8)
tzinfo (1.2.5) tzinfo (1.2.5)
@ -107,6 +110,7 @@ DEPENDENCIES
sequel_pg sequel_pg
shotgun shotgun
sinatra sinatra
sitemap_generator
unicorn unicorn
vcr vcr
webmock webmock

5
config/sitemap.rb Normal file
View File

@ -0,0 +1,5 @@
# frozen_string_literal: true
SitemapGenerator::Sitemap.default_host = 'https://frankfurter.app'
SitemapGenerator::Sitemap.public_path = 'lib/web/public'
SitemapGenerator::Sitemap.create

7
lib/tasks/sitemap.rake Normal file
View File

@ -0,0 +1,7 @@
# frozen_string_literal: true
begin
require 'sitemap_generator/tasks'
rescue LoadError
return
end

View File

@ -0,0 +1,4 @@
User-agent: *
Disallow:
Sitemap: https://frankfurter.app/sitemap.xml.gz

Binary file not shown.