Commit 1c38535b authored by Jan Klass's avatar Jan Klass

Sort loc URLs in produced sitemap.xml

parent 7202c156
module Sitemap
using LightXML
export write_sitemap
function write_sitemap(filename, urls)
xdoc = XMLDocument()
xurlset = create_root(xdoc, "urlset")
......@@ -13,4 +15,17 @@ function write_sitemap(filename, urls)
save_file(xdoc, filename)
end
function sort(set::Set)
vec = Vector()
for val in set
push!(vec, val)
end
sort!(vec)
return vec
end
function write_sitemap(filename, urls::Set)
write_sitemap(filename, sort(urls))
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment