Skip to content

Commit

Permalink
https в sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaspell committed Jun 14, 2018
1 parent 98dc81d commit 9f74f22
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 3 additions & 1 deletion config.rb
Expand Up @@ -18,6 +18,8 @@
config.output_style = :expanded
end

Haml::TempleEngine.disable_option_validator!

set :markdown, :fenced_code_blocks => true,
:autolink => true,
:smartypants => true
Expand Down Expand Up @@ -63,7 +65,7 @@ def is_page_active(page)
activate :robots, :rules => [
{:user_agent => '*', :allow => %w(/)}
],
:sitemap => 'http://sass-scss.ru/sitemap.xml'
:sitemap => 'https://sass-scss.ru/sitemap.xml'

set :relative_links, true

Expand Down
2 changes: 1 addition & 1 deletion data/sitemap.yml
@@ -1 +1 @@
url: http://sass-scss.ru
url: https://sass-scss.ru
11 changes: 11 additions & 0 deletions sitemap.xml.builder
@@ -0,0 +1,11 @@
xml.instruct!
xml.urlset 'xmlns' => "http://www.sitemaps.org/schemas/sitemap/0.9" do
sitemap.resources.select { |page| page.path =~ /\.html/ }.each do |page|
xml.url do
xml.loc "#{data.sitemap.url}#{page.path}"
xml.lastmod Date.today.to_time.iso8601
xml.changefreq page.data.changefreq || "monthly"
xml.priority page.data.priority || "0.5"
end
end
end

0 comments on commit 9f74f22

Please sign in to comment.