-
Notifications
You must be signed in to change notification settings - Fork 56
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
chore: Test Docusaurus webpack 5 support #616
Conversation
Welcome! Thank you and congrats on your first pull request. What happens next?
Good luck to us all! |
Vulnerable Libraries (1)
More info on how to fix Vulnerable Libraries in JavaScript. 👉 Go to the dashboard for detailed results. 📥 Happy? Share your feedback with us. |
Hi @slorber, thanks for helping to test the performance benefits of webpack 5 with our site! FYI, @glicht discovered we could shave ~12 minutes off the server build time by wrapping the |
Concerning |
NP, I'd be happy to help improve the perf of this site as it's probably one of the largest Docusaurus site and a good benchmark showing that we should rather improve 😅 !
Thanks, I think it makes sense that Docusaurus could only render collapsed sidebar items on the client, after hydration already happened. Didn't think the sidebar could have a significant impact on build time, but it makes sense for very large sidebars like yours. Will note to investigate that, but I'm not sure it's a good idea as it can have impacts on SEO, as crawlers could have a harder time finding links of your site.
This is a new frontmatter validation we added recently, but will relax it to make it allow empty strings as before. BTW, unrelated but can you add your apps to the Docusaurus showcase, please? |
@slorber we can add caching of |
@slorber also wanted to say thanks on this effort. Really appreciated. I am looking at the build log and I see that the build is failing on an empty value for |
I don't think it's a problem if once every X weeks you have a full rebuild with a cold cache. You'll only get the speed improvements if the cache is persisted, which is still better than the current state.
no problem :) helping you will help the whole Docusaurus community in the end
Yes definitively, I'll fix this and update the PR. Was able to build by doing some local doc changes. Fixed in facebook/docusaurus#4687 |
Noticed on your doc that you have both a markdown title + a frontmatter title: ---
id: 19.10.0
title: "19.10.0"
custom_edit_url: https://github.com/demisto/content-docs/blob/master/content-repo/extra-docs/releases/19.10.0.md
hide_title: true
---
# Demisto Content Release Notes for version 19.10.0 (30654)
##### Published on 02 October 2019
### Integrations
Can you explain the motivation? My intuition is that you want the page title to be the frontmatter.title, and the markdown title to be the user-visible h1 heading. I'm restoring this behavior that changed recently in facebook/docusaurus#4665 (comment) Also, there's the |
# Conflicts: # docusaurus.config.js # package-lock.json # package.json
# Conflicts: # docusaurus.config.js # package-lock.json # package.json
Upgraded the PR to latest repo changes but had some issues:
Also suggesting to remove the It's probably worth it to "re-swizzle" your custom theme comps at some point to upgrade them, as some code has changed and you might want to sync with our upstream changes |
The command |
Not sure why it does not work only for me, but any deps you use directly should be in package.json, so I added it |
Can you please approve the CI workflow. This is a new thing required now, to protect against hackers using CI to farm bitcoins 😅 |
fixed a little breaking change in Docusaurus code in the marketplace sidebar code. this PR is ready for review now |
approved |
Preview Site AvailableCongratulations! The automatic build has completed succesfully. Important: Make sure to inspect your changes at the preview site. |
Preview Site AvailableCongratulations! The automatic build has completed succesfully. Important: Make sure to inspect your changes at the preview site. |
Hi Please let me know if you find any issues with this PR, as I'm trying to see if the released Webpack 5 support is good ;) I suggest to remove the |
Hi @slorber sorry for the late response. Our motivation is basically to have a different h1 title on the page than the one used in the sidebar. See the example image: Will this be possible with the upcoming Docusaurus update? |
@glicht yes we actually have a better frontmatter for that usecase: ---
id: 19.11.0
- title: "19.11.0"
+ sidebar_label: "19.11.0"
custom_edit_url: https://github.com/demisto/content-docs/blob/master/content-repo/extra-docs/releases/19.11.0.md
- hide_title: true
---
# Demisto Content Release Notes for version 19.11.0 (33434) As it's on a separate repo, I can't include this in the current PR and the preview will remain broken: https://pull-request-616--demisto-content-docs.netlify.app/docs/reference/releases/21.4.1 By the way, the config now accept an edit URL function, this may be helpful to replace your hardcoded |
@slorber thanks for the clarification. When we go and update we will change the frontmatter. I am going to try to also enable the caching on this PR to see the effect. Will be committing directly to your branch. |
Thanks, let me know how it works. About the large sidebar, I've opened an issue to track potential perf improvements: facebook/docusaurus#4753 I will also try to figure out how to improve the developer experience, because running |
Preview Site AvailableCongratulations! The automatic build has completed succesfully. Important: Make sure to inspect your changes at the preview site. |
1 similar comment
Preview Site AvailableCongratulations! The automatic build has completed succesfully. Important: Make sure to inspect your changes at the preview site. |
Preview Site AvailableCongratulations! The automatic build has completed succesfully. Important: Make sure to inspect your changes at the preview site. |
3 similar comments
Preview Site AvailableCongratulations! The automatic build has completed succesfully. Important: Make sure to inspect your changes at the preview site. |
Preview Site AvailableCongratulations! The automatic build has completed succesfully. Important: Make sure to inspect your changes at the preview site. |
Preview Site AvailableCongratulations! The automatic build has completed succesfully. Important: Make sure to inspect your changes at the preview site. |
Caching seems to be working very good. Reduces the build time from 52 minutes to 12. @sserrata FYI |
Great news 🤗 |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you'd like to keep it open, please leave a comment with the status of the PR. Thank you for your contribution! |
This pull request has been automatically closed because there has been no activity for 21 days. Please feel free to reopen it (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
@glicht FYI we also added a way to use esbuild in the beta.0 , maybe you can try it and see how it improves perf? It's not yet documented, but we are using it in production on the Docusaurus site itself. |
Thanks @slorber. We are planning to upgrade soon. Will check this out. |
@sserrata @glicht this Docusaurus PR might make your "sidebar only on the client" less necessary: It won't save as much time as simply not rendering the whole sidebar on the server, but seems to me a good compromise. It's up to you to keep your existing optim if you want. |
Use an unreleased version of Docusaurus to test the webpack5 support works for this site.
See also facebook/docusaurus#4089
It might improve performances on rebuild, but it requires that you set up caching of
node_modules/.cache
across your CI builds (not sure how this site is built exactly)Running locally: