docs: document what should be in .gitignore (#1709)

* docs: explain .gitignore for generated site

* update changelog

* Update getting-started-preparation.md

* Update getting-started-preparation.md

* Update getting-started-preparation.md
This commit is contained in:
Wei Gao 2019-07-26 15:32:43 +08:00 committed by Yangshun Tay
parent ab7e3589d0
commit 9c1ba2c35c
4 changed files with 38 additions and 33 deletions

View file

@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
## [Unreleased] ## [Unreleased]
**Docs**
- docs: document what should be in .gitignore ([https://github.com/facebook/docusaurus/pull/1709](https://github.com/facebook/docusaurus/pull/1709))
## [1.12.0] - 2019-07-20 ## [1.12.0] - 2019-07-20
### Changes ### Changes

View file

@ -11,6 +11,7 @@ As shown after you [installed Docusaurus](getting-started-installation.md), the
```bash ```bash
root-directory root-directory
├── .gitignore
├── docs ├── docs
│ ├── doc1.md │ ├── doc1.md
│ ├── doc2.md │ ├── doc2.md
@ -35,23 +36,22 @@ root-directory
### Directory Descriptions ### Directory Descriptions
* **Documentation Source Files**: The `docs` directory - **Documentation Source Files**: The `docs` directory contains example documentation files written in Markdown.
contains example documentation files written in Markdown. - **Blog**: The `website/blog` directory contains examples of blog posts written in markdown.
* **Blog**: The `website/blog` directory contains examples of blog posts written in markdown. - **Pages**: The `website/pages` directory contains example top-level pages for the site.
* **Pages**: The `website/pages` directory contains example top-level pages for the site. - **Static files and images**: The `website/static` directory contains static assets used by the example site.
* **Static files and images**: The `website/static` directory contains static assets used by the example site.
### Key Files ### Key Files
* **Footer**: The `website/core/Footer.js` file is a React component that acts - **Footer**: 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.
as the footer for the site generated by Docusaurus and should be customized by the user. - **Configuration file**: The `website/siteConfig.js` file is the main configuration file used by Docusaurus.
* **Configuration file**: The `website/siteConfig.js` file is the main - **Sidebars**: The `sidebars.json` file contains the structure and order of the documentation files.
configuration file used by Docusaurus. - **.gitignore**: The `.gitignore` file lists the necessary ignore files for the generated site so that they do not get added to the git repo.
* **Sidebars**: The `sidebars.json` file contains the structure and order
of the documentation files.
## Preparation Notes ## Preparation Notes
You will need to keep the `website/siteConfig.js` and `website/core/Footer.js` files but may edit them as you wish. The value of the `customDocsPath` key in `website/siteConfig.js` can be modified if you wish to use a different directory name or path. The `website` directory can also be renamed to anything you want it to be. You will need to keep the `website/siteConfig.js` and `website/core/Footer.js` files but may edit them as you wish. The value of the `customDocsPath` key in `website/siteConfig.js` can be modified if you wish to use a different directory name or path. The `website` directory can also be renamed to anything you want it to be.
However, you should keep the `website/pages` and `website/static` directories. You 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`. However, you should keep the `website/pages` and `website/static` directories. You 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`.
If your directory does not yet have a `.gitignore`, we generate it with the necessary ignored files listed. As a general rule, you should ignore all `node_modules`, build files, system files (`.DS_Store`), logs, etc. [Here](https://github.com/github/gitignore/blob/master/Node.gitignore) is a more comprehensive list of what is normally ignored for Node.js projects.

View file

@ -12,6 +12,7 @@ As shown after you [installed Docusaurus](getting-started-installation.md), the
```bash ```bash
root-directory root-directory
├── .gitignore
├── docs ├── docs
│ ├── doc1.md │ ├── doc1.md
│ ├── doc2.md │ ├── doc2.md
@ -36,23 +37,23 @@ root-directory
### Directory Descriptions ### Directory Descriptions
* **Documentation Source Files**: The `docs` directory - **Documentation Source Files**: The `docs` directory contains example documentation files written in Markdown.
contains example documentation files written in Markdown. - **Blog**: The `website/blog` directory contains examples of blog posts written in markdown.
* **Blog**: The `website/blog` directory contains examples of blog posts written in markdown. - **Pages**: The `website/pages` directory contains example top-level pages for the site.
* **Pages**: The `website/pages` directory contains example top-level pages for the site. - **Static files and images**: The `website/static` directory contains static assets used by the example site.
* **Static files and images**: The `website/static` directory contains static assets used by the example site.
### Key Files ### Key Files
* **Footer**: The `website/core/Footer.js` file is a React component that acts - **Footer**: 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.
as the footer for the site generated by Docusaurus and should be customized by the user. - **Configuration file**: The `website/siteConfig.js` file is the main configuration file used by Docusaurus.
* **Configuration file**: The `website/siteConfig.js` file is the main - **Sidebars**: The `sidebars.json` file contains the structure and order of the documentation files.
configuration file used by Docusaurus. - **.gitignore**: The `.gitignore` file lists the necessary ignore files for the generated site so that they do not get added to the git repo.
* **Sidebars**: The `sidebars.json` file contains the structure and order
of the documentation files.
## Preparation Notes ## Preparation Notes
You will need to keep the `website/siteConfig.js` and `website/core/Footer.js` files but may edit them as you wish. The value of the `customDocsPath` key in `website/siteConfig.js` can be modified if you wish to use a different directory name or path. The `website` directory can also be renamed to anything you want it to be. You will need to keep the `website/siteConfig.js` and `website/core/Footer.js` files but may edit them as you wish. The value of the `customDocsPath` key in `website/siteConfig.js` can be modified if you wish to use a different directory name or path. The `website` directory can also be renamed to anything you want it to be.
However, you should keep the `website/pages` and `website/static` directories. You 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`. However, you should keep the `website/pages` and `website/static` directories. You 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`.
If your directory does not yet have a `.gitignore`, we generate it with the necessary ignored files listed. As a general rule, you should ignore all `node_modules`, build files, system files (`.DS_Store`), logs, etc. [Here](https://github.com/github/gitignore/blob/master/Node.gitignore) is a more comprehensive list of what is normally ignored for Node.js projects.

View file

@ -12,6 +12,7 @@ As shown after you [installed Docusaurus](getting-started-installation.md), the
```bash ```bash
root-directory root-directory
├── .gitignore
├── docs ├── docs
│ ├── doc1.md │ ├── doc1.md
│ ├── doc2.md │ ├── doc2.md
@ -36,23 +37,22 @@ root-directory
### Directory Descriptions ### Directory Descriptions
* **Documentation Source Files**: The `docs` directory - **Documentation Source Files**: The `docs` directory contains example documentation files written in Markdown.
contains example documentation files written in Markdown. - **Blog**: The `website/blog` directory contains examples of blog posts written in markdown.
* **Blog**: The `website/blog` directory contains examples of blog posts written in markdown. - **Pages**: The `website/pages` directory contains example top-level pages for the site.
* **Pages**: The `website/pages` directory contains example top-level pages for the site. - **Static files and images**: The `website/static` directory contains static assets used by the example site.
* **Static files and images**: The `website/static` directory contains static assets used by the example site.
### Key Files ### Key Files
* **Footer**: The `website/core/Footer.js` file is a React component that acts - **Footer**: 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.
as the footer for the site generated by Docusaurus and should be customized by the user. - **Configuration file**: The `website/siteConfig.js` file is the main configuration file used by Docusaurus.
* **Configuration file**: The `website/siteConfig.js` file is the main - **Sidebars**: The `sidebars.json` file contains the structure and ordering of the documentation files.
configuration file used by Docusaurus. - **.gitignore**: The `.gitignore` file lists the necessary ignore files for the generated site so that they do not get added to the git repo.
* **Sidebars**: The `sidebars.json` file contains the structure and ordering
of the documentation files.
## Preparation Notes ## Preparation Notes
You will need to keep the `website/siteConfig.js` and `website/core/Footer.js` files, but may edit them as you wish. The value of the `customDocsPath` key in `website/siteConfig.js` can be modified if you wish to use a different directory name or path. The `website` directory can also be renamed to anything you want it to be. You will need to keep the `website/siteConfig.js` and `website/core/Footer.js` files, but may edit them as you wish. The value of the `customDocsPath` key in `website/siteConfig.js` can be modified if you wish to use a different directory name or path. The `website` directory can also be renamed to anything you want it to be.
However, you should keep the `website/pages` and `website/static` directories. You 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`. However, you should keep the `website/pages` and `website/static` directories. You 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`.
If your directory does not yet have a `.gitignore`, we generate it with the necessary ignored files listed. As a general rule, you should ignore all `node_modules`, build files, system files (`.DS_Store`), logs, etc. [Here](https://github.com/github/gitignore/blob/master/Node.gitignore) is a more comprehensive list of what is normally ignored for Node.js projects.