From 0743515ff1d55f913797d437451356f94e2c784e Mon Sep 17 00:00:00 2001 From: Joel Marcey Date: Tue, 8 Aug 2017 11:43:41 -0700 Subject: [PATCH] Add site preparation doc (#41) * Add site preparation doc * Make website folder explicit * Rebase --- docs/getting-started-preparation.md | 69 +++++++++++++++++++++++++++++ website/sidebars.json | 1 + 2 files changed, 70 insertions(+) create mode 100644 docs/getting-started-preparation.md diff --git a/docs/getting-started-preparation.md b/docs/getting-started-preparation.md new file mode 100644 index 0000000000..cf4c9b72d0 --- /dev/null +++ b/docs/getting-started-preparation.md @@ -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. diff --git a/website/sidebars.json b/website/sidebars.json index e78c7d6dbc..be978c1ebe 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -2,6 +2,7 @@ "docs": { "Getting Started": [ "installation", + "site-preparation", "getting-started" ], "Guides": [