Skip to content

Commit

Permalink
add 'how to add a new document'
Browse files Browse the repository at this point in the history
  • Loading branch information
xujianxin committed Aug 31, 2018
1 parent ec1be78 commit 8b76e71
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This project was created by [sphinx](http://www.sphinx-doc.org/en/master/) and uploaded to [readthedocs](https://readthedocs.org/) for hosting. Url of online documentation after hosting is: https://nebdocs.readthedocs.io/en_US/latest/index.html.

This project supports documents in the following two formats:

- Markdown(.md)
- reStructuredText(.rst)

The directory structure of the document is defined in the README.rst file in the same directory.

## Language version and branch rules:
1. The multi-language version is managed separately by different branches. The currently supported languages are as follows:
- master: English version;
Expand All @@ -28,6 +35,55 @@ cd nebdocs
make html
```

## How to add a new document?
### If just add a file
1. Add the file to the appropriate directory;
2. Locate the README.rst file in the directory where the file is located (the project root directory is index.rst file), open the file, and add the newly added file name to the file list after the 'toctree' keyword. E.g:

For this file structure:
```
+--folder
   |
   +--README.rst
   +--config.md
   +--contributors.md
   +--newFile.md
```

The content of README.rst should look like this:
```
.. toctree::
    :titlesonly:
    Config.md
    Contributors.md
    newFile .md
```

### If you need to add a new directory
In this case, you need to add a README.rst file to define the document directory structure in this directory. Put other file names in the file list after the 'toctree' keyword. For details, refer to other README.rst files. The file list in the README.rst file of the previous directory should add the relative path of the README.rst file of the current directory, for example:

For this file structure:
```
+--folder
   |
   +--README.rst
   +--config.md
   +--contributors.md
   +--newDirectory
      |
      +--README.rst
      +--newFile.md
```
The contents of the folder/README.rst file should be:
```
.. toctree::
    :titlesonly:
    Config.md
    Contributors.md
    newDirectory/README.rst
## How to add a new language version?
1. Create a new branch, for the Chinese version example:
Expand Down

0 comments on commit 8b76e71

Please sign in to comment.