Skip to content

feat(v2): Improve the initial templates#4302

Merged
slorber merged 14 commits into
facebook:masterfrom
MLH-Fellowship:ShinteiMai/init-templates
Mar 12, 2021
Merged

feat(v2): Improve the initial templates#4302
slorber merged 14 commits into
facebook:masterfrom
MLH-Fellowship:ShinteiMai/init-templates

Conversation

@stevenhansel

@stevenhansel stevenhansel commented Feb 26, 2021

Copy link
Copy Markdown

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:

docusaurus-2

  • Add a getting started documentation on Docusaurus.
  • Add a documentation on Markdown Features.
  • Add a small documentation on how to create a page, documentation, and post.
  • Add a thank you doc, which contains What's next? that suggests the user some actions related to Docusaurus itself.
  • Removed the initial docs from the classic template.

Future Plans:

  • Add more content and improve the styling of the index page

Related Contributors

  • @besemuna is working on the "extras" part of the initial templates.

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.)

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Feb 26, 2021
@netlify

netlify Bot commented Feb 26, 2021

Copy link
Copy Markdown

[V1] Deploy preview success

Built with commit a0bd2d5

https://deploy-preview-4302--docusaurus-1.netlify.app

@netlify

netlify Bot commented Feb 26, 2021

Copy link
Copy Markdown

Deploy preview for docusaurus-2 ready!

Built with commit a0bd2d5

https://deploy-preview-4302--docusaurus-2.netlify.app

@github-actions

github-actions Bot commented Feb 26, 2021

Copy link
Copy Markdown

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 90
🟢 Accessibility 96
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-4302--docusaurus-2.netlify.app/classic/

@github-actions

github-actions Bot commented Feb 26, 2021

Copy link
Copy Markdown

Size Change: -46 B (0%)

Total Size: 532 kB

Filename Size Change
website/build/assets/css/styles.********.css 87.1 kB -46 B (0%)
ℹ️ View Unchanged
Filename Size Change
website/build/assets/js/main.********.js 359 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 60.3 kB 0 B
website/build/docs/introduction/index.html 235 B 0 B
website/build/index.html 25.4 kB 0 B

compressed-size-action

@slorber slorber left a comment

Copy link
Copy Markdown
Collaborator

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?

Comment thread packages/docusaurus-init/templates/classic/docs/gettingStarted.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/gettingStarted.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/gettingStarted.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/doc1.md
module.exports = {
someSidebar: {
Docusaurus: ['doc1', 'doc2', 'doc3'],
Docusaurus: ['getting-started'],

Copy link
Copy Markdown
Collaborator

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?

Copy link
Copy Markdown
Author

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.

@lex111

lex111 commented Mar 4, 2021

Copy link
Copy Markdown
Contributor

@ShinteiMai so we need to close this PR in favor of #4320?

@stevenhansel

Copy link
Copy Markdown
Author

@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.

@lex111

lex111 commented Mar 4, 2021

Copy link
Copy Markdown
Contributor

@ShinteiMai can you both (cc @besemuna) split the changes in your PRs so we can merge these ones, and your efforts were credited?

@stevenhansel

Copy link
Copy Markdown
Author

@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

@slorber slorber added the pr: new feature This PR adds a new API or behavior. label Mar 5, 2021

@slorber slorber left a comment

Copy link
Copy Markdown
Collaborator

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

Comment thread packages/docusaurus-init/templates/classic/docs/getting-started.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/getting-started.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/getting-started.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/getting-started.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/create-a-doc.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/create-a-doc.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/create-a-page.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/create-a-page.md Outdated
Comment thread packages/docusaurus-init/templates/classic/docs/create-a-page.md Outdated
This was referenced Mar 17, 2021
slorber added a commit that referenced this pull request Mar 17, 2021
* 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>
mrizwanashiq pushed a commit to mrizwanashiq/docusaurus that referenced this pull request Jun 25, 2026
* 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

* fix: reduce the content of the init templates

* update the init template

Co-authored-by: Lisa Chandra <52909743+lisa761@users.noreply.github.com>
Co-authored-by: Javid <singularity.javid@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
mrizwanashiq pushed a commit to mrizwanashiq/docusaurus that referenced this pull request Jun 25, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants