2015-06-26 09:09:29 +03:00
|
|
|
Contributing
|
|
|
|
======
|
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
The documentation is built using [Sphinx](http://sphinx-doc.org) and
|
|
|
|
[reStructuredText](http://sphinx-doc.org/rest.html), and then hosted by
|
|
|
|
[ReadTheDocs](http://dotnet.readthedocs.org).
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
## Building the Docs
|
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
To build the docs, you will need to install
|
2015-11-05 20:14:21 +03:00
|
|
|
[python](https://www.python.org/downloads/) (version 2). If you are
|
2015-06-30 16:55:46 +03:00
|
|
|
running Windows, you will want to add the Python install folder and the
|
2015-11-05 20:14:21 +03:00
|
|
|
\Scripts\ folder to your `PATH` environment variable.
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
To install Sphinx, open a command prompt and run:
|
|
|
|
|
|
|
|
pip install sphinx
|
|
|
|
|
|
|
|
This may take a few minutes.
|
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
This project is also using a custom theme from ReadTheDocs, which you can
|
|
|
|
install with:
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
pip install sphinx_rtd_theme
|
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
Note that later if you wish to update your current, installed version of this
|
|
|
|
theme, you should run:
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
pip install -U sphinx_rtd_theme
|
|
|
|
|
|
|
|
You should now be able to navigate to the `docs` folder and run
|
|
|
|
|
|
|
|
make html
|
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
which should generate the documentation in the _build folder. Open the
|
|
|
|
_build/html/index.html file to view the generated documentation.
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
If contributing new documentation content, please review:
|
|
|
|
|
2015-10-05 22:37:20 +03:00
|
|
|
- the [Sphinx Style Guide](http://documentation-style-guide-sphinx.readthedocs.org/en/latest/style-guide.html)
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
## Adding Content ##
|
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
Before adding content, submit an issue with a suggestion for your proposed
|
|
|
|
article. Provide detail on what the article would discuss, and how it would
|
|
|
|
relate to existing documentation.
|
2015-06-26 09:09:29 +03:00
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
Articles should be organized into logical groups or sections. Each section
|
|
|
|
should be given a named folder (e.g. /yourfirst). That section contains the
|
|
|
|
rst files for all articles in the section. For images and other static
|
|
|
|
resources, create a subfolder that matches the name of the article. Within this
|
|
|
|
subfolder, create a ``sample`` folder for code samples and a ``_static`` folder
|
|
|
|
for images and other static content.
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
### Example Structure ###
|
|
|
|
|
|
|
|
docs
|
|
|
|
/concepts
|
|
|
|
/getting-started
|
|
|
|
/porting
|
|
|
|
/_static
|
|
|
|
portability_report.png
|
|
|
|
...
|
2015-06-30 16:55:46 +03:00
|
|
|
**Note:** Sphinx will automatically fix duplicate image names. There is no need
|
|
|
|
to try to ensure uniqueness of static files beyond an individual article.
|
2015-06-26 09:09:29 +03:00
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
Author information is kept in _authors.txt_ file in the docs folder. The authors
|
|
|
|
should be specified by a name and a link to the author's GitHub profile.
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
## Process for Contributing ##
|
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
**Step 1:** Open an Issue describing the article you wish to write and how it
|
|
|
|
relates to existing content. Get approval to write your article.
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
**Step 2:** Fork the `/dotnet/core-docs` repo.
|
|
|
|
|
|
|
|
**Step 3:** Create a `branch` for your article.
|
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
**Step 4:** Write your article, placing the article in its own folder and any
|
|
|
|
needed images in a _static folder located in the same folder as the article.
|
|
|
|
Be sure to follow the proper reStructuredText syntax. If you have code samples,
|
|
|
|
place them in a folder within the `/samples/` folder.
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
**Step 5:** Submit a Pull Request from your branch to `dotnet/core-docs/master`.
|
|
|
|
|
2015-06-30 16:55:46 +03:00
|
|
|
**Step 6:** Discuss the Pull Request with the .NET team; make any requested
|
|
|
|
updates to your branch. When they are ready to accept the PR, they will add a
|
|
|
|
"LGTM" (Looks Good To Me) comment and any other steps that are (maybe) needed.
|
2015-06-26 09:09:29 +03:00
|
|
|
|
2015-07-23 21:04:19 +03:00
|
|
|
## Guidance Checklist ##
|
2015-06-26 09:09:29 +03:00
|
|
|
|
2015-07-23 21:04:19 +03:00
|
|
|
Below is a short list of guiding rules that you should keep in mind when you are
|
|
|
|
contributing to .NET Core documentation.
|
2015-06-26 09:09:29 +03:00
|
|
|
|
|
|
|
- Don't forget to submit an issue before starting work on an article
|
|
|
|
- Don't forget to create a separate branch before working on your article
|
|
|
|
- Don't update or `merge` your branch after you submit your pull request
|
2015-06-30 16:55:46 +03:00
|
|
|
- If updating code samples in `/samples/`, be sure any line number references
|
|
|
|
in your article remain correct
|
2015-11-05 21:28:48 +03:00
|
|
|
|
|
|
|
## Contributing to Samples
|
|
|
|
|
2015-11-15 00:38:51 +03:00
|
|
|
See the [Samples Readme](https://github.com/dotnet/core-docs/blob/master/samples/README.md).
|