-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
feat(v2): add Facebook Docusaurus 2 template #2124
Conversation
Deploy preview for docusaurus-preview ready! Built with commit 11be4c5 |
Deploy preview for docusaurus-2 ready! Built with commit 11be4c5 |
@@ -75,6 +79,10 @@ module.exports = { | |||
{ | |||
docs: { | |||
sidebarPath: require.resolve('./sidebars.js'), | |||
editUrl: | |||
'https://github.com/facebook/docusaurus/edit/master/website/', | |||
showLastUpdateAuthor: true, |
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 think maybe we shouldnt the last updated time & author by default. This slows build down (like a LOT) and I think its nicer to give them an impression that "Wow, docusaurus 2 is fast". For newly init site (and lot of our user) does not use git yet, so they're going to see "Sorry, this requires git" error also. Only if they need it they will need to enable it.
and the editUrl is also pointing to the wrong repo.
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.
Ok I'll remove the last updated time and author display.
and the editUrl is also pointing to the wrong repo.
This is intended to give them the right default value (if they create a website
folder at the root of their repo). We don't know their repo so it's never going to be right.
title: This is Document Number 3 | ||
--- | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac euismod odio, eu consequat dui. Nullam molestie consectetur risus id imperdiet. Proin sodales ornare turpis, non mollis massa ultricies id. Nam at nibh scelerisque, feugiat ante non, dapibus tortor. Vivamus volutpat diam quis tellus elementum bibendum. Praesent semper gravida velit quis aliquam. Etiam in cursus neque. Nam lectus ligula, malesuada et mauris a, bibendum faucibus mi. Phasellus ut interdum felis. Phasellus in odio pulvinar, porttitor urna eget, fringilla lectus. Aliquam sollicitudin est eros. Mauris consectetur quam vitae mauris interdum hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. |
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 any extra information coming from this docs btw ? Like the other docs purpose is to demonstrate MDX, heading, etc. This lorem ipsum can be not super useful btw and just increase few seconds of first build.
I dont know why but I prefer having minimal init site, and make the user think "WOW its so fast !!!!"
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.
Not really. I don't mind cleaning up but in a future 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.
OOps btw just realized its been there since the beginning. You're just making a copy of it for fb template
Maybe time to clean this up (?) wdyt
{ | ||
docs: { | ||
sidebarPath: require.resolve('./sidebars.js'), | ||
editUrl: |
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.
ditto
sidebarPath: require.resolve('./sidebars.js'), | ||
editUrl: | ||
'https://github.com/facebook/docusaurus/edit/master/website/', | ||
showLastUpdateAuthor: true, |
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.
ditto
Btw I just realized the only difference is just the copyright. I wonder if we should just strip out the copyright header (babel can do this really well) and only maintain one template. If they choose classic, we just strip out comment |
No, there's also the FB OSS image logo which I took out from the classic footer. Anyway, I intend to add more FB-specific tooling stuff later (e.g. default Prettier config, the copyright header lint rules). Also potentially add more FB-specific components for all the FB Docusaurus sites. It will continue to diverge even further after this 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.
approved but definitely something to consider is to just maintain one template. If they choose classic, we just strip out the header comment with terser https://github.com/terser/terser
ok |
Motivation
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Run sites locally
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)