mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-05 21:27:24 +02:00
Add site preparation doc (#41)
* Add site preparation doc * Make website folder explicit * Rebase
This commit is contained in:
parent
164fa390c2
commit
0743515ff1
2 changed files with 70 additions and 0 deletions
69
docs/getting-started-preparation.md
Normal file
69
docs/getting-started-preparation.md
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
---
|
||||||
|
id: site-preparation
|
||||||
|
title: Site Preparation
|
||||||
|
---
|
||||||
|
|
||||||
|
After [installing Docusaurus](./getting-started-installation.md), you will want to install and run the example site included. This serves dual purposes.
|
||||||
|
|
||||||
|
1. Verifying that Docusaurus was installed correctly.
|
||||||
|
1. Providing you the skeleton to create your site.
|
||||||
|
|
||||||
|
## Verifying Installation
|
||||||
|
|
||||||
|
1. Generate the files for the example site by running `examples` using `yarn` or `npm`.
|
||||||
|
|
||||||
|
```
|
||||||
|
npm run examples
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```
|
||||||
|
yarn run examples
|
||||||
|
```
|
||||||
|
|
||||||
|
> If any of the files created by `[yarn | npm] run examples` already exists, Docusaurus will not overwrite them.
|
||||||
|
|
||||||
|
1. Run the server.
|
||||||
|
|
||||||
|
```
|
||||||
|
npm run start
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```
|
||||||
|
yarn run start
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Load the example site at http://localhost:3000. You should see the example site loaded in your web browser.
|
||||||
|
|
||||||
|
## Example Site Configuration
|
||||||
|
|
||||||
|
Loading the example site will create the following files/folders:
|
||||||
|
|
||||||
|
```
|
||||||
|
website/core/Footer.js
|
||||||
|
website/pages/...
|
||||||
|
website/static/img/...
|
||||||
|
website/siteConfig.js
|
||||||
|
website/blog-examples-from-docusaurus/...
|
||||||
|
docs-examples-from-docusaurus/...
|
||||||
|
```
|
||||||
|
|
||||||
|
> The `docs-examples-from-docusaurus` folder will be at the same directory level as `website`, not in it.
|
||||||
|
|
||||||
|
The provided example files contain configurations that can be used as starting points for your site:
|
||||||
|
|
||||||
|
- The `website/core/Footer.js` file is a React component that acts as the footer for the site generated by Docusaurus and should be customized by the user.
|
||||||
|
- The `website/blog-examples-from-docusaurus` folder contains examples of blog posts written in markdown.
|
||||||
|
- The `docs-examples-from-docusaurus` folder contains example documentation files written in markdown.
|
||||||
|
- The `website/pages` folder contains example top-level pages for the site.
|
||||||
|
- The `website/static` folder contains static assets used by the example site.
|
||||||
|
- The `website/siteConfig.js` file is the main configuration file used by Docusaurus.
|
||||||
|
|
||||||
|
You will need to keep the `website/siteConfig.js` and `website/core/Footer.js` files, but may edit them as you wish.
|
||||||
|
|
||||||
|
You should keep the `website/pages` and `website/static` folders, but may change the content inside them as you wish. At the bare minimum you should have an `en/index.js` or `en/index.html` file inside `website/pages` and an image to use as your header icon inside `website/static`.
|
||||||
|
|
||||||
|
The `website/blog-examples-from-docusaurus` and `docs-examples-from-docusaurus` folders contain example blog and document markdown files. If you wish to run Docusaurus with these files, you need to rename the folders to `website/blog` and `docs`, respectively.
|
|
@ -2,6 +2,7 @@
|
||||||
"docs": {
|
"docs": {
|
||||||
"Getting Started": [
|
"Getting Started": [
|
||||||
"installation",
|
"installation",
|
||||||
|
"site-preparation",
|
||||||
"getting-started"
|
"getting-started"
|
||||||
],
|
],
|
||||||
"Guides": [
|
"Guides": [
|
||||||
|
|
Loading…
Add table
Reference in a new issue