mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-19 03:57:01 +02:00
feat: add tutorial (#1381)
* feat: add tutorial * feat: complete tutorial * Fix link
This commit is contained in:
parent
2d24e478a5
commit
23e56f61f5
12 changed files with 1294 additions and 0 deletions
62
docs/tutorial-create-new-site.md
Normal file
62
docs/tutorial-create-new-site.md
Normal file
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
id: tutorial-create-new-site
|
||||
title: Create a New Site
|
||||
---
|
||||
|
||||
In this section we'll get our Docusaurus site up and running for local development. The process takes less than a few minutes.
|
||||
|
||||
<img alt="Docusaurus browser" src="/img/undraw_docusaurus_browser.svg" style="max-width: 400px; margin: 3rem auto"/>
|
||||
|
||||
## Scaffold the Site
|
||||
|
||||
1. Execute the `docusaurus-init` command.
|
||||
|
||||
The following contents will be created for you in the directory you are in (TODO).
|
||||
|
||||
```sh
|
||||
├── Dockerfile
|
||||
├── docker-compose.yml
|
||||
├── docs-examples-from-docusaurus
|
||||
│ ├── doc1.md
|
||||
│ ├── doc2.md
|
||||
│ ├── doc3.md
|
||||
│ ├── exampledoc4.md
|
||||
│ └── exampledoc5.md
|
||||
└── website
|
||||
├── README.md
|
||||
├── blog-examples-from-docusaurus
|
||||
│ ├── 2016-03-11-blog-post.md
|
||||
│ ├── 2017-04-10-blog-post-two.md
|
||||
│ ├── 2017-09-25-testing-rss.md
|
||||
│ ├── 2017-09-26-adding-rss.md
|
||||
│ └── 2017-10-24-new-version-1.0.0.md
|
||||
├── core
|
||||
│ └── Footer.js
|
||||
├── package.json
|
||||
├── pages
|
||||
│ └── en
|
||||
│ ├── help.js
|
||||
│ ├── index.js
|
||||
│ └── users.js
|
||||
├── sidebars.json
|
||||
├── siteConfig.js
|
||||
├── static
|
||||
│ ├── css
|
||||
│ │ └── custom.css
|
||||
│ └── img
|
||||
│ ├── docusaurus.svg
|
||||
│ ├── favicon
|
||||
│ │ └── favicon.ico
|
||||
│ ├── favicon.png
|
||||
│ └── oss_logo.png
|
||||
└── yarn.lock
|
||||
```
|
||||
|
||||
There would be some example documentation and blog pages generated.
|
||||
|
||||
2. Run `cd website` to go into the `website` directory.
|
||||
1. Run `npm start` or `yarn start`.
|
||||
|
||||
A browser window will open up at http://localhost:3000.
|
||||
|
||||
Congratulations, you have just made your first Docusaurus site! Click around the pages generated for you to see what's available.
|
Loading…
Add table
Add a link
Reference in a new issue