mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-08 06:37:18 +02:00
Co-authored-by: Joshua Chen <sidachen2003@gmail.com> Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com> Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com> Co-authored-by: Ivan Mar (sOkam!) <7308253+heysokam@users.noreply.github.com> Co-authored-by: c0h1b4 <dwidman@gmail.com> Co-authored-by: Janessa Garrow <janessa.garrow@gmail.com> Co-authored-by: ozaki <29860391+OzakIOne@users.noreply.github.com> Co-authored-by: axmmisaka <6500159+axmmisaka@users.noreply.github.com> Co-authored-by: Tatsunori Uchino <tats.u@live.jp> Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com> fix(i18n): complete translations for theme-common.json Brazilian Portuguese (pt-BR) (#9477) fix(content-blog): add baseUrl for author.image_url (#9581) fix(type-aliases): add `title` prop for imported inline SVG React components (#9612) fix(utils): Markdown link replacement with <> but no spaces (#9617) fix(live-codeblock): stabilize react-live transformCode callback, fix editor/preview desync (#9631) fix(cli): output help when no conventional config + no subcommand (#9648) fix CI job (#9604) fix Lint Autofix workflow (#9632) fix(pwa-plugin): upgrade workbox (#9668) fix(create-docusaurus): fix init template code blocks, and little improvements (#9696) fix(theme): allow empty code blocks and live playgrounds (#9704)
56 lines
1.1 KiB
Markdown
56 lines
1.1 KiB
Markdown
# `create-docusaurus`
|
|
|
|
Create Docusaurus apps easily with simplified commands:
|
|
|
|
```bash
|
|
npm init docusaurus
|
|
```
|
|
|
|
```bash
|
|
yarn create docusaurus
|
|
```
|
|
|
|
```bash
|
|
npx create-docusaurus@latest
|
|
```
|
|
|
|
## Usage
|
|
|
|
Please see the [installation documentation](https://docusaurus.io/docs/installation).
|
|
|
|
## For maintainers
|
|
|
|
For Docusaurus maintainers, templates can be tested with:
|
|
|
|
```bash
|
|
cd `git rev-parse --show-toplevel` # Back to repo root
|
|
rm -rf test-website
|
|
yarn create-docusaurus test-website classic
|
|
cd test-website
|
|
yarn start
|
|
```
|
|
|
|
Note: `test-website` is not part of the workspace and use packages from npm.
|
|
|
|
Use the following to test the templates against local packages:
|
|
|
|
```bash
|
|
cd `git rev-parse --show-toplevel` # Back to repo root
|
|
rm -rf test-website-in-workspace
|
|
yarn create-docusaurus test-website-in-workspace classic
|
|
cd test-website-in-workspace
|
|
yarn build
|
|
yarn start
|
|
```
|
|
|
|
For the TypeScript template:
|
|
|
|
```bash
|
|
cd `git rev-parse --show-toplevel` # Back to repo root
|
|
rm -rf test-website-in-workspace
|
|
yarn create-docusaurus test-website-in-workspace classic --typescript
|
|
cd test-website-in-workspace
|
|
yarn typecheck
|
|
yarn build
|
|
yarn start
|
|
```
|