-
-
Save ajmalafif/9f2d60baa459670fd43b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - var paths = [], files = []; function recursiveTree(obj) { if (typeof obj == "object" && !obj.length) { for (item in obj) { if (item === "contents") { recursiveTree(obj[item]); } else if (item != "data") { paths.push(item); recursiveTree(obj[item]); paths.splice(paths.length-1, 1); } } } else if (typeof obj == "object") { for (i in obj) { var file = obj[i]; if (/(\.html$)/.test(file)) { paths.push(file); files.push("/" + paths.join("/")); paths.splice(paths.length-1, 1); } } } }; recursiveTree(public); | |
| xml | |
| urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9") | |
| - for(i in files) { | |
| url | |
| loc= files[i] | |
| priority 0.5 | |
| - } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment