Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ How To Use:
1. Copy file into your _plugins folder within your Jekyll project.
2. Ensure url is set in your config file (for example `url: http://danielgroves.net`)
3. In your config file, change `sitemap: file:` if you want your sitemap to be called something other than sitemap.xml.
4. Change the `sitemap: exclude:` list to exclude any pages that you don't want in the sitemap.
4. Change the `sitemap: exclude:` list to exclude any pages or directory that you don't want in the sitemap.
5. Change the `sitemap: include_posts:` list to include any pages that are looping through your posts (e.g. "/index.html", "/notebook/index.md", etc.). This will ensure that right after you make a new post, the last modified date will be updated to reflect the new post.
6. Run Jekyll: `jekyll` to re-generate your site.
7. A `sitemap.xml` should be included in your _site folder.
Expand All @@ -22,6 +22,7 @@ sitemap:
- "/atom.xml"
- "/feed.xml"
- "/feed/index.xml"
- "/images/"
include_posts:
- "/index.html"
change_frequency_name: "change_frequency"
Expand Down
2 changes: 1 addition & 1 deletion sitemap_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def greater_date(date1, date2)
#
# Returns boolean
def excluded?(site, name)
@config['exclude'].include? name
@config['exclude'].any? { |i| name.index(i) == 0 }
end

def posts_included?(site, name)
Expand Down