lib/middleman-alias/extension.rb in middleman-alias-0.0.3 vs lib/middleman-alias/extension.rb in middleman-alias-0.0.4
- old
+ new
@@ -8,10 +8,10 @@
def manipulate_resource_list(resources)
resources.each do |resource|
if resource.data["alias"]
alias_url = resource.data["alias"]
- alias_url += "/index.html" unless alias_url.match(/\.html$/)
+ alias_url += "/index.html" if alias_url.match(/\/$/)
Sitemap::Resource.new(@app.sitemap, alias_url).tap do |p|
p.proxy_to("alias.html")
p.add_metadata locals: {
destination: resource.url
}