Skip to content

feat(v2): Improve the initial templates #4302#4320

Merged
slorber merged 30 commits into
facebook:masterfrom
MLH-Fellowship:besemuna/init-templates
Mar 17, 2021
Merged

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

Conversation

@samuelships

@samuelships samuelships commented Mar 1, 2021

Copy link
Copy Markdown
Contributor

Screen Recording

Motivation

Attempt to fix #4079, with small consistent commits. This pr is a follow up to #4302.
This is my progress so far

  • Added content for deploying your site

RoadMap

  • Add content for translating site and managing versions

/cc @ShinteiMai

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 Mar 1, 2021
@netlify

netlify Bot commented Mar 1, 2021

Copy link
Copy Markdown

[V1] Deploy preview success

Built with commit 4eb31e4

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

@github-actions

github-actions Bot commented Mar 1, 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

@netlify

netlify Bot commented Mar 1, 2021

Copy link
Copy Markdown

Deploy preview for docusaurus-2 ready!

Built with commit 4eb31e4

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

@github-actions

github-actions Bot commented Mar 1, 2021

Copy link
Copy Markdown

⚡️ Lighthouse report for the changes in this PR:

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

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

@samuelships

Copy link
Copy Markdown
Contributor Author

@slorber Still waiting for a review

# Conflicts:
#	packages/docusaurus-init/templates/classic/docs/create-a-page.md
#	packages/docusaurus-init/templates/classic/docs/getting-started.md
#	packages/docusaurus-init/templates/classic/docs/markdown-features.mdx
#	packages/docusaurus-init/templates/classic/docs/thank-you.md
#	packages/docusaurus-init/templates/classic/sidebars.js
@slorber

slorber commented Mar 14, 2021

Copy link
Copy Markdown
Collaborator

FYI I merged master in this PR and resolved the conflicts for you

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

Same comment as on the PR by @ShinteiMai

This page is way too verbose, we need something much more simple.

We don't need an exhaustive guide on how to deploy to GH pages, and particularly not a tutorial on how to automate this process with Github actions and the complicated CI script. This does not really spark joy to the user but rather a headache 😅

Basically, you just need to tell the user to run npm run build, and document the simplest way to get this site online.

  • Self-host: npm run serve (no need to explain --port -- host options here or tell it's not performant)
  • Github pages: tell the user to add a minimal config and npm run deploy (don't show an exhaustive list of env variable options here, don't tell how to automate this)
  • Netlify or Vercel: signup, run npm run build and then drag & drop the ./build folder

Try to remove useless wordings and keep it minimalistic, inspire yourself from the 1st part which was largely trimmed, and use an imperative tone.

We should rather tell the user exactly what to do, we should not really give him any options (apart from choosing a hosting solution), so avoid telling the user about any cli or env variable options

@samuelships

Copy link
Copy Markdown
Contributor Author

@slorber, I have made some changes

@samuelships
samuelships requested a review from slorber March 16, 2021 11:12
@samuelships

Copy link
Copy Markdown
Contributor Author

@javidrashid I have added a screen recording.

@slorber

slorber commented Mar 16, 2021

Copy link
Copy Markdown
Collaborator

Thanks, that looks better to me

Can you please run prettier on your docs files? Those are not formatted and there are missing line breaks around code blocks/admonitions.

I'm even surprised that the CI linter does not complain on this, will investigate

It is not the most performant solution
:::

:::warning It is not the most performant solution :::

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.

unfortunately this code is not valid anymore after prettier has been run 😅 that's why I said there were missing line breaks, because you have to add extra line breaks in some places before running prettier

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.

going to revert your commit and do the fixes directly so I can merge asap

@slorber slorber added the pr: documentation This PR works on the website or other text documents in the repo. label Mar 17, 2021
@slorber

slorber commented Mar 17, 2021

Copy link
Copy Markdown
Collaborator

FYI I edited the whole tutorial on this PR to make it more coherent, and cleaned up some mistakes.

Thanks for working on this, going to merge now

@samuelships

Copy link
Copy Markdown
Contributor Author

Thanks @slorber

@slorber
slorber merged commit b99a403 into facebook:master Mar 17, 2021
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: documentation This PR works on the website or other text documents in the repo.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the initial templates

4 participants