Skip to content

Commit

Permalink
docs: use "npx create-docusaurus" for init (#5797)
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Oct 27, 2021
1 parent 2e85848 commit ca5d70d
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion website/docs/i18n/i18n-crowdin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The end result can be seen at [docusaurus-crowdin-example.netlify.app](https://d
Initialize a new Docusaurus site:

```bash
npm init docusaurus@latest website classic
npx create-docusaurus@latest website classic
```

Add the site configuration for the French language:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/i18n/i18n-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This is a walk-through of using Git to translate a newly initialized English Doc
Initialize a new Docusaurus site:

```bash
npm init docusaurus@latest website classic
npx create-docusaurus@latest website classic
```

Add the site configuration for the French language:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/i18n/i18n-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This tutorial will walk you through the basis of the **Docusaurus i18n system**.

We will add **French** translations to a **newly initialized English Docusaurus website**.

Initialize a new site with `npm init docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).
Initialize a new site with `npx create-docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).

## Configure your site {#configure-your-site}

Expand Down
10 changes: 5 additions & 5 deletions website/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@ Use **[docusaurus.new](https://docusaurus.new)** to test Docusaurus immediately
The easiest way to install Docusaurus is to use the command line tool that helps you scaffold a skeleton Docusaurus website. You can run this command anywhere in a new empty repository or within an existing repository, it will create a new directory containing the scaffolded files.

```bash
npm init docusaurus@latest [name] [template]
npx create-docusaurus@latest [name] [template]
```

Example:

```bash
npm init docusaurus@latest website classic
npx create-docusaurus@latest website classic
```

If you do not specify `name` or `template`, it will prompt you for them. We recommend the `classic` template so that you can get started quickly, and it contains features found in Docusaurus 1. The `classic` template contains `@docusaurus/preset-classic` which includes standard documentation, a blog, custom pages, and a CSS framework (with dark mode support). You can get up and running extremely quickly with the classic template and customize things later on when you have gained more familiarity with Docusaurus.

**[FB-Only]:** If you are setting up a new Docusaurus website for a Facebook open source project, use the `facebook` template instead, which comes with some useful Facebook-specific defaults:

```bash
npm init docusaurus@latest my-website facebook
npx create-docusaurus@latest my-website facebook
```

If you want to skip installing dependencies, use the `--skip-install` option, like the following:

```bash
npm init docusaurus@latest my-website classic -- --skip-install
npx create-docusaurus@latest my-website classic --skip-install
```

You can also use the template's TypeScript variant by passing the `--typescript` flag.

```bash
npm init docusaurus@latest my-website classic -- --typescript
npx create-docusaurus@latest my-website classic --typescript
```

## Project structure {#project-structure}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Create a new Docusaurus site and follow the **very short** embedded tutorial.
Install [Node.js](https://nodejs.org/en/download/) and create a new Docusaurus site:

```bash
npm init docusaurus@latest my-website classic
npx create-docusaurus@latest my-website classic
```

Start the site:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/typescript-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Docusaurus is written in TypeScript, and provides first-class TypeScript support
Docusaurus supports writing and using TypeScript theme components. If the init template provides a Typescript variant, you can directly initialize a site with full TypeScript support by using the `--typescript` flag.

```bash
npm init docusaurus@latest my-website classic -- --typescript
npx create-docusaurus@latest my-website classic --typescript
```

Below are some guides on how to migrate an existing project to TypeScript.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The end result can be seen at [docusaurus-crowdin-example.netlify.app](https://d
Initialize a new Docusaurus site:

```bash
npm init docusaurus@latest website classic
npx create-docusaurus@latest website classic
```

Add the site configuration for the French language:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This is a walk-through of using Git to translate a newly initialized English Doc
Initialize a new Docusaurus site:

```bash
npm init docusaurus@latest website classic
npx create-docusaurus@latest website classic
```

Add the site configuration for the French language:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This tutorial will walk you through the basis of the **Docusaurus i18n system**.

We will add **French** translations to a **newly initialized English Docusaurus website**.

Initialize a new site with `npm init docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).
Initialize a new site with `npx create-docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).

## Configure your site {#configure-your-site}

Expand Down
10 changes: 5 additions & 5 deletions website/versioned_docs/version-2.0.0-beta.7/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@ Use **[docusaurus.new](https://docusaurus.new)** to test Docusaurus immediately
The easiest way to install Docusaurus is to use the command line tool that helps you scaffold a skeleton Docusaurus website. You can run this command anywhere in a new empty repository or within an existing repository, it will create a new directory containing the scaffolded files.

```bash
npm init docusaurus@latest [name] [template]
npx create-docusaurus@latest [name] [template]
```

Example:

```bash
npm init docusaurus@latest website classic
npx create-docusaurus@latest website classic
```

If you do not specify `name` or `template`, it will prompt you for them. We recommend the `classic` template so that you can get started quickly, and it contains features found in Docusaurus 1. The `classic` template contains `@docusaurus/preset-classic` which includes standard documentation, a blog, custom pages, and a CSS framework (with dark mode support). You can get up and running extremely quickly with the classic template and customize things later on when you have gained more familiarity with Docusaurus.

**[FB-Only]:** If you are setting up a new Docusaurus website for a Facebook open source project, use the `facebook` template instead, which comes with some useful Facebook-specific defaults:

```bash
npm init docusaurus@latest my-website facebook
npx create-docusaurus@latest my-website facebook
```

If you want to skip installing dependencies, use the `--skip-install` option, like the following:

```bash
npm init docusaurus@latest my-website classic --skip-install
npx create-docusaurus@latest my-website classic --skip-install
```

You can also use the template's TypeScript variant by passing the `--typescript` flag.

```bash
npm init docusaurus@latest my-website classic --typescript
npx create-docusaurus@latest my-website classic --typescript
```

## Project structure {#project-structure}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Create a new Docusaurus site and follow the **very short** embedded tutorial.
Install [Node.js](https://nodejs.org/en/download/) and create a new Docusaurus site:

```bash
npm init docusaurus@latest my-website classic
npx create-docusaurus@latest my-website classic
```

Start the site:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Docusaurus is written in TypeScript, and provides first-class TypeScript support
Docusaurus supports writing and using TypeScript theme components. If the init template provides a Typescript variant, you can directly initialize a site with full TypeScript support by using the `--typescript` flag.

```bash
npm init docusaurus@latest my-website classic --typescript
npx create-docusaurus@latest my-website classic --typescript
```

Below are some guides on how to migrate an existing project to TypeScript.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The end result can be seen at [docusaurus-crowdin-example.netlify.app](https://d
Initialize a new Docusaurus site:

```bash
npm init docusaurus@latest website classic
npx create-docusaurus@latest website classic
```

Add the site configuration for the French language:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This is a walk-through of using Git to translate a newly initialized English Doc
Initialize a new Docusaurus site:

```bash
npm init docusaurus@latest website classic
npx create-docusaurus@latest website classic
```

Add the site configuration for the French language:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This tutorial will walk you through the basis of the **Docusaurus i18n system**.

We will add **French** translations to a **newly initialized English Docusaurus website**.

Initialize a new site with `npm init docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).
Initialize a new site with `npx create-docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).

## Configure your site {#configure-your-site}

Expand Down
10 changes: 5 additions & 5 deletions website/versioned_docs/version-2.0.0-beta.8/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@ Use **[docusaurus.new](https://docusaurus.new)** to test Docusaurus immediately
The easiest way to install Docusaurus is to use the command line tool that helps you scaffold a skeleton Docusaurus website. You can run this command anywhere in a new empty repository or within an existing repository, it will create a new directory containing the scaffolded files.

```bash
npm init docusaurus@latest [name] [template]
npx create-docusaurus@latest [name] [template]
```

Example:

```bash
npm init docusaurus@latest website classic
npx create-docusaurus@latest website classic
```

If you do not specify `name` or `template`, it will prompt you for them. We recommend the `classic` template so that you can get started quickly, and it contains features found in Docusaurus 1. The `classic` template contains `@docusaurus/preset-classic` which includes standard documentation, a blog, custom pages, and a CSS framework (with dark mode support). You can get up and running extremely quickly with the classic template and customize things later on when you have gained more familiarity with Docusaurus.

**[FB-Only]:** If you are setting up a new Docusaurus website for a Facebook open source project, use the `facebook` template instead, which comes with some useful Facebook-specific defaults:

```bash
npm init docusaurus@latest my-website facebook
npx create-docusaurus@latest my-website facebook
```

If you want to skip installing dependencies, use the `--skip-install` option, like the following:

```bash
npm init docusaurus@latest my-website classic -- --skip-install
npx create-docusaurus@latest my-website classic --skip-install
```

You can also use the template's TypeScript variant by passing the `--typescript` flag.

```bash
npm init docusaurus@latest my-website classic -- --typescript
npx create-docusaurus@latest my-website classic --typescript
```

## Project structure {#project-structure}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Create a new Docusaurus site and follow the **very short** embedded tutorial.
Install [Node.js](https://nodejs.org/en/download/) and create a new Docusaurus site:

```bash
npm init docusaurus@latest my-website classic
npx create-docusaurus@latest my-website classic
```

Start the site:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Docusaurus is written in TypeScript, and provides first-class TypeScript support
Docusaurus supports writing and using TypeScript theme components. If the init template provides a Typescript variant, you can directly initialize a site with full TypeScript support by using the `--typescript` flag.

```bash
npm init docusaurus@latest my-website classic -- --typescript
npx create-docusaurus@latest my-website classic --typescript
```

Below are some guides on how to migrate an existing project to TypeScript.
Expand Down

0 comments on commit ca5d70d

Please sign in to comment.