New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sitemap.xsl if exists #143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small style change, but 👍
@@ -46,6 +46,7 @@ def sitemap | |||
site_map.content = File.read(source_path).gsub(MINIFY_REGEX, "") | |||
site_map.data["layout"] = nil | |||
site_map.data["static_files"] = static_files.map(&:to_liquid) | |||
site_map.data["xsl"] = File.exist? @site.in_source_dir("sitemap.xsl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd abstract sitemap_exists
to be file_exists?
and share the logic between the two methods.
@@ -1,4 +1,7 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
{% if page.xsl %} | |||
<?xml-stylesheet type="text/xsl" href="{{ "/sitemap.xsl" | absolute_url }}"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd intent this for readability (it's minifified anyways)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
@jekyllbot: merge +minor |
No description provided.