-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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): Improve the initial templates #4302
feat(v2): Improve the initial templates #4302
Conversation
[pull] master from facebook:master
[pull] master from facebook:master
[pull] master from facebook:master
[V1] Deploy preview success Built with commit a0bd2d5 |
Deploy preview for docusaurus-2 ready! Built with commit a0bd2d5 |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4302--docusaurus-2.netlify.app/classic/ |
Size Change: -46 B (0%) Total Size: 532 kB
ℹ️ View Unchanged
|
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.
Thanks, that's a good start.
I made some suggestions, particularly about the docs we may want.
For this PR I think you could just work on the first part (not the Extras category), so that we can merge it before everything is done?
packages/docusaurus-init/templates/classic/docs/gettingStarted.md
Outdated
Show resolved
Hide resolved
packages/docusaurus-init/templates/classic/docs/gettingStarted.md
Outdated
Show resolved
Hide resolved
packages/docusaurus-init/templates/classic/docs/gettingStarted.md
Outdated
Show resolved
Hide resolved
@@ -1,6 +1,6 @@ | |||
module.exports = { | |||
someSidebar: { | |||
Docusaurus: ['doc1', 'doc2', 'doc3'], | |||
Docusaurus: ['getting-started'], |
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 suggest we could use the following docs/sidebar:
module.exports = {
docs: {
"Docusaurus Tutorial": [
"Docusaurus Intro", // Basic infos + install steps
"Create a doc", // + how to add it to the sidebar
"Create a page", // jsx + md
"Create a post",
"Markdown Features", // basic markdown + some MDX explanations
"Thank you" // end of tutorial, show what's next?
],
Extras: [
"Deploy your site", // configure a bit + build + deploy to GH pages?
"Translate your site", // very basic version, like add "fr" language + put a copy `docs/intro.md` to `i18n/fr/plugin-docs/intro.md` + run `yarn start --locale fr`
"Manage versions" // just run the versioning cli + restart the site with yarn start
]
}
};
Does it make sense to you?
Maybe it's too much doc, don't know, we may remove some sections from the Extras category?
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.
Yes, thank you for giving me out this overall structure. I already put some work in the Docusaurus Tutorial part and I think there are too many things in the Markdown Features right now, maybe we can like include some examples in Create a doc
section and then for the details we can refer to the main documentation site?
For the Extras part, I think Translate your site is a little bit too specific (this is pretty subjective), we can just refer to the main docs.
@ShinteiMai so we need to close this PR in favor of #4320? |
Most likely, yes. From what @slorber said, the template structure is this: module.exports = {
docs: {
"Docusaurus Tutorial": [
"Docusaurus Intro", // Basic infos + install steps
"Create a doc", // + how to add it to the sidebar
"Create a page", // jsx + md
"Create a post",
"Markdown Features", // basic markdown + some MDX explanations
"Thank you" // end of tutorial, show what's next?
],
Extras: [
"Deploy your site", // configure a bit + build + deploy to GH pages?
"Translate your site", // very basic version, like add "fr" language + put a copy `docs/intro.md` to `i18n/fr/plugin-docs/intro.md` + run `yarn start --locale fr`
"Manage versions" // just run the versioning cli + restart the site with yarn start
]
}
}; This PR #4302 is focused at the "docs" part, which is the main content of the initial templates, and #4320 is the "extras" part. |
@ShinteiMai can you both (cc @besemuna) split the changes in your PRs so we can merge these ones, and your efforts were credited? |
Sure, I will edit the description of this PR and cc him |
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.
Thanks, that looks like a great improvement compared to the previous version already!
I think your text is too verbose and you add too much details, this should really be something minimalistic.
Remember the user will read the real doc in the end if he's convinced so we don't have to show him all the features.
Does it make sense?
I may be wrong, just expressing my opinions
packages/docusaurus-init/templates/classic/docs/getting-started.md
Outdated
Show resolved
Hide resolved
packages/docusaurus-init/templates/classic/docs/getting-started.md
Outdated
Show resolved
Hide resolved
packages/docusaurus-init/templates/classic/docs/getting-started.md
Outdated
Show resolved
Hide resolved
packages/docusaurus-init/templates/classic/docs/getting-started.md
Outdated
Show resolved
Hide resolved
packages/docusaurus-init/templates/classic/docs/create-a-doc.md
Outdated
Show resolved
Hide resolved
packages/docusaurus-init/templates/classic/docs/create-a-doc.md
Outdated
Show resolved
Hide resolved
packages/docusaurus-init/templates/classic/docs/create-a-page.md
Outdated
Show resolved
Hide resolved
packages/docusaurus-init/templates/classic/docs/create-a-page.md
Outdated
Show resolved
Hide resolved
packages/docusaurus-init/templates/classic/docs/create-a-page.md
Outdated
Show resolved
Hide resolved
* feat: add getting started doc at classic inital templates * fix: improve the contents of getting started page * fix: fix slug routing * fix: rename gettingStarted to getting-started and re-adjust the content * feat: add markdown-features docs * feat: add a page on how to create a simple document * feat: add a page on how to create pages * feat: add create a post doc * feat: add thank you page with whats next * feat : update sidebar.js * feat : add introduction content * feat : add self hosting content * feat : add GitHub pages content * fix : remove automatically deploying with github actions content * feat : add deploying to netlify * feat : add Translate your site * add : Manage versions * fix : formatted docs with prettier * Revert "fix : formatted docs with prettier" This reverts commit af8c0b4 * run prettier to init templates with fixes * complete new init template * rename manage-docs-versions * change wording * refresh config file * rework init template homepage * minor changes Co-authored-by: Lisa Chandra <52909743+lisa761@users.noreply.github.com> Co-authored-by: Javid <singularity.javid@gmail.com> Co-authored-by: ShinteiMai <stevenhanselgo@gmail.com> Co-authored-by: slorber <lorber.sebastien@gmail.com>
Motivation
The main motivation is to improve the contents of the initial templates. It's issued at #4079 that the initial templates should be a "small" representative of a real documentation site and show real content instead of lorem ipsum.
Current Progress:
What's next?
that suggests the user some actions related to Docusaurus itself.Future Plans:
Related Contributors
Have you read the Contributing Guidelines on pull requests?
Yes.
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
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.)