mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 16:47:26 +02:00
docs: make installation guide more beginner-friendly (#6187)
* Add support for beginners * Add files via upload * Update intro.md * Update intro.md * Update intro.md * Update intro.md * Update intro.md * Edits * Edits * Last nits * Edit * Update installation.md Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
c7e6409add
commit
7fcadd0c36
2 changed files with 20 additions and 7 deletions
|
@ -12,24 +12,36 @@ Get started by **creating a new site**.
|
|||
|
||||
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
|
||||
|
||||
### What you'll need
|
||||
|
||||
- [Node.js](https://nodejs.org/en/download/) version 14 or above:
|
||||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||
|
||||
## Generate a new site
|
||||
|
||||
Generate a new Docusaurus site using the **classic template**:
|
||||
Generate a new Docusaurus site using the **classic template**.
|
||||
|
||||
The classic template will automatically be added to your project after you run the command:
|
||||
|
||||
```shell
|
||||
npm init docusaurus@latest my-website classic
|
||||
```
|
||||
|
||||
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
|
||||
|
||||
The command also installs all necessary dependencies you need to run Docusaurus.
|
||||
|
||||
## Start your site
|
||||
|
||||
Run the development server:
|
||||
|
||||
```shell
|
||||
cd my-website
|
||||
|
||||
npx docusaurus start
|
||||
npm run start
|
||||
```
|
||||
|
||||
Your site starts at `http://localhost:3000`.
|
||||
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
|
||||
|
||||
Open `docs/intro.md` and edit some lines: the site **reloads automatically** and displays your changes.
|
||||
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
|
||||
|
||||
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
|
||||
|
|
|
@ -15,7 +15,8 @@ Use **[docusaurus.new](https://docusaurus.new)** to test Docusaurus immediately
|
|||
|
||||
## Requirements {#requirements}
|
||||
|
||||
- [Node.js](https://nodejs.org/en/download/) version >= 14 or above (which can be checked by running `node -v`). You can use [nvm](https://github.com/nvm-sh/nvm) for managing multiple Node versions on a single machine installed
|
||||
- [Node.js](https://nodejs.org/en/download/) version >= 14 or above (which can be checked by running `node -v`). You can use [nvm](https://github.com/nvm-sh/nvm) for managing multiple Node versions on a single machine installed.
|
||||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||
- [Yarn](https://yarnpkg.com/en/) version >= 1.5 (which can be checked by running `yarn --version`). Yarn is a performant package manager for JavaScript and replaces the `npm` client. It is not strictly necessary but highly encouraged.
|
||||
|
||||
## Scaffold project website {#scaffold-project-website}
|
||||
|
@ -164,4 +165,4 @@ Use new unreleased features of Docusaurus with the [`@canary` npm dist tag](/com
|
|||
|
||||
## Problems? {#problems}
|
||||
|
||||
Ask for help on [Stack Overflow](https://stackoverflow.com/questions/tagged/docusaurus), on our [GitHub repository](https://github.com/facebook/docusaurus) or [Twitter](https://twitter.com/docusaurus).
|
||||
Ask for help on [Stack Overflow](https://stackoverflow.com/questions/tagged/docusaurus), on our [GitHub repository](https://github.com/facebook/docusaurus), our [Discord](https://discordapp.com/invite/docusaurus) or [Twitter](https://twitter.com/docusaurus).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue