Update site creation docs (#204)

This commit is contained in:
Joel Marcey 2017-11-01 09:48:28 -07:00 committed by GitHub
parent 1324ddfa47
commit ab169640d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,26 +3,30 @@ id: site-creation
title: Creating your site
---
Docusaurus' primary purpose of existence is to make it super simple for you to create documentation for your project and have a site to house those docs.
Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.
After [installation](getting-started-installation.md) and [preparation](getting-started-preparation.md), much of the work to create a basic site for your docs is already complete.
## Load the Example Site
[Preparation](getting-started-preparation.md) created a sample site for you to see Docusaurus in action. However, it also provided the infrastructure that will be used as you are developing your own site.
## Site Structure
After loading the example site, you should see a structure in your repo that looks similar to:
Your site structure looks like the following:
```bash
root-of-repo
├── docs
└── website
│ └── blog
│ └── core
│ └── Footer.js
│ └── node_modules
│ └── package.json
│ └── pages
│ └── sidebars.json
│ └── siteConfig.js
│ └── static
```
project-repo/
docs/
doc1.md
website/
blog/
2017-05-06-blog-post.md
```
> This assumes that you removed the example `.md` files that were installed with the [initialization](getting-started-installation.md) script.
All of your documentation files should be placed inside the `docs` folder as markdown `.md` files. Any blog posts should be inside the `blog` folder.
@ -32,18 +36,18 @@ All of your documentation files should be placed inside the `docs` folder as mar
To create a fully functional site, you only need to do a few steps:
1. Add your documentation to the `/docs` folder as `.md` files, ensuring you have the proper [header](api-doc-markdown.md) in each file.
1. Add zero or more docs to the [`sidebars.json`](guides-navigation.md) file so that your documentation is rendered in a sidebar, if you choose them to be.
1. Add your documentation to the `/docs` folder as `.md` files, ensuring you have the proper [header](api-doc-markdown.md#documents) in each file.
1. Add zero or more docs to the [`sidebars.json`](guides-navigation.md#adding-docs-to-a-sidebar) file so that your documentation is rendered in a sidebar, if you choose them to be.
> If you do not add your documentation to the `sidebars.json` file, the docs will be rendered, but they can only be linked to from other documentation and visited with the known URL.
1. Modify the `website/siteConfig.js` file to [configure your site](api-site-config.md), following the comments included in that file to guide you.
1. [Customize](guides-custom-pages.md) the `website/core/Footer.js` file that provides the footer for your site.
1. Modify the `website/siteConfig.js` file to [configure your site](api-site-config.md), following the comments included in the [docs](api-site-config.md) and the `website/siteConfig.js` to guide you.
1. Create any [custom pages](guides-custom-pages.md#customizing-your-site-footer) and/or [customize](guides-custom-pages.md#customizing-your-site-footer) the `website/core/Footer.js` file that provides the footer for your site.
1. Place assets, such as images, in the `website/static/` folder.
1. Run the site to see the results of your changes.
```
cd website
yarn run start # or - npm run start
yarn run start # or `npm run start`
# navigate to http://localhost:3000
```