docs: add/update documentation (#38590)

This commit is contained in:
Mrugesh Mohapatra
2020-04-21 02:16:46 +05:30
committed by GitHub
parent 7db718141b
commit 0541506488
8 changed files with 93 additions and 84 deletions

View File

@ -1,37 +1,3 @@
> ### All our documentation and contributing guidlines are available on a dedicated site here: <https://contribute.freecodecamp.org>.
## Our contributing docs are available here: <https://contribute.freecodecamp.org>.
### Looking to edit the contributing guidelines?
To work on the contributing guidelines, you can edit these files [available here](https://github.com/freeCodeCamp/freeCodeCamp/tree/master/docs). When your changes are merged, it will be made available automatically at the documentation site linked above.
**You do not need to setup anything locally for working on the documentation.**
### How is the documentation site generated?
The documentation site is generated using [`docsify`](https://docsify.js.org), and served using GitHub pages. Typically you would not need to change any configuration, or build the site locally, but incase you are interested here is how it works:
1. The guideline homepage's source is [`index.html`](index.html). GitHub Pages serve this file as a SPA using `docsify`.
2. The `docsify` script generates the content of `markdown` files in `/docs` directory on demand when you are browsing the documentation site.
3. The home page is genrated from the [`index.md`](index.md) and sidebar navigation is generated from [`components/sidebar.md`](components/sidebar.md).
4. To serve the docs locally:
Clone freeCodeCamp:
```sh
git clone https://github.com/freeCodeCamp/freeCodeCamp.git
docsify serve docs
```
Install `docsify`:
```sh
npm install -g docsify
```
and serve the `/docs` directory
```sh
docsify serve docs
```
Alternatively, if you have installed freeCodeCamp locally (see the local setup guide), we bundle the CLI with the development tools so you can run `npm run docs:serve` from the root of the repo.
Looking to edit these docs? Read [this document](https://contribute.freecodecamp.org/#/how-to-work-on-the-docs-theme) first.