We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb852bf commit eb33cd7Copy full SHA for eb33cd7
_plugins/sitemap_generator.rb
@@ -1,9 +1,13 @@
1
require 'jekyll-sitemap'
2
3
module Jekyll
4
-
5
- #override the method from the original Jekyll-sitemap gem so it always uses our template instead of using their built-in template
6
- class JekyllSitemap < Jekyll::Generator
+ class JekyllSitemap < Jekyll::Generator
+ def generate(site)
+ @site = site
7
+ @site.pages << sitemap unless file_exists?("sitemap.xml")
8
+ end
9
+
10
+ #override the method from the original Jekyll-sitemap gem so it always uses our template instead of using their built-in template
11
def source_path
12
File.expand_path('sitemap.xml', File.dirname(__FILE__))
13
end
0 commit comments