-
Notifications
You must be signed in to change notification settings - Fork 302
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
Added sitemap.xml gen #20
base: master
Are you sure you want to change the base?
Conversation
Added sitemap.xml gen
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
I signed it! |
CLAs look good, thanks! |
crawlsite.js
Outdated
var p = ""; | ||
crawledPages.forEach(element => { | ||
var n = "\t\t<url>\n"; | ||
n = n + "\t\t\t<loc>\n"; |
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.
Is there a node lib we could use instead of manually crafting the xml?
crawlsite.js
Outdated
@@ -161,6 +162,28 @@ async function crawl(browser, page, depth = 0) { | |||
} | |||
} | |||
|
|||
function buildSitemap() { | |||
if (SITEMAP && crawledPages) { | |||
var p = ""; |
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.
Use let throughout
Interested in this! |
Requested changed are done. |
This one fell off my radar, thought I'd get it done. Hope that helps. |
Just a note, the sitemap generator might need a filter for anchor same page links (aka My quick and dirty fix would be to just add |
Added sitemap.xml gen