Class: Jekyll::JekyllSitemap

Inherits:
Generator
  • Object
show all
Defined in:
lib/jekyll/jekyll-sitemap.rb

Instance Method Summary collapse

Instance Method Details

#generate(site) ⇒ Object

Main plugin action, called by Jekyll-core



11
12
13
14
15
# File 'lib/jekyll/jekyll-sitemap.rb', line 11

def generate(site)
  @site = site
  @site.pages << sitemap unless file_exists?("sitemap.xml")
  @site.pages << robots unless file_exists?("robots.txt")
end