-
-
Notifications
You must be signed in to change notification settings - Fork 74
feat(builders,daffio): generate sitemap #4152
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
base: develop
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,2 @@ | |||
| Sitemap: https://next.daff.io/sitemapindex.xml | |||
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.
Extract the robots.txt out to another PR
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.
done, coming after this is merged
| resolve, | ||
| join, | ||
| } from 'node:path'; | ||
| import { create } from 'xmlbuilder2'; |
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 was looking at the depgraph of xmlbuilder2. It looks like it has a few more deps. It also appears slower than https://github.com/NaturalIntelligence/fast-xml-parser/ according to their benchmarks (I had to run these manually).
Do you think we should write to use fast-xml-parser? I don't know if you already evaluated this.
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 haven't. Given that this is a dev only dep, I didn't put that much thought into it.
| const sitemap = options.sitemaps[name]; | ||
| if ('prerenderedRoutes' in sitemap) { | ||
| try { | ||
| const routes = Object.keys(JSON.parse(await readFile(join(PROJECT_ROOT, <string>sitemap.prerenderedRoutes), 'utf-8')).routes); |
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.
Write a test for this builder.
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.
done
ab4dcb8 to
a47a1e5
Compare
7c75fea to
956686e
Compare
|
@damienwebdev this needs a re-review |
|
@damienwebdev bump |
PR Checklist
PR Type
Current behavior
Fixes: #4094
Part of: #
New behavior
Breaking change?
Additional context