2015-06-26 09:09:29 +03:00
Contributing
======
2015-11-17 22:53:04 +03:00
The documentation is built using [docfx ](http://aspnet.github.io/docfx/ ) and
[Markdown ](https://daringfireball.net/projects/markdown/syntax ). It is hosted on the [.NET Core ](http://dotnet.github.io/ ) website.
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-17 22:53:04 +03:00
[docfx ](http://aspnet.github.io/docfx/ ); latest versions are the best.
2015-06-26 09:09:29 +03:00
2015-11-17 22:53:04 +03:00
There are several ways to use docfx, and most of them are covered in the docfx [getting started guide ](http://aspnet.github.io/docfx/tutorial/docfx_getting_started.html ). This small guide will use the [DNX-based ](http://aspnet.github.io/docfx/tutorial/docfx_getting_started.html#use-docfx-under-dnx ) version of the tool to be able to invoke it from the command line; if you are comfortable with other ways listed on the link above, feel free to use those.
2015-06-26 09:09:29 +03:00
2015-11-17 22:53:04 +03:00
**Note:** please note that as of now, docfx requires the full .NET Framework (Windows) or Mono (Linux/OSX). We will be working towards porting it to .NET Core in the future.
2015-06-26 09:09:29 +03:00
2015-11-17 22:53:04 +03:00
The conceptual documentation is placed in the docs folder in the root of the repo so most of the work will happen there.
2015-06-26 09:09:29 +03:00
2015-11-17 22:53:04 +03:00
Using the DNX-based docfx tool, you build the resulting
2015-06-26 09:09:29 +03:00
2015-11-17 22:53:04 +03:00
docfx build
After build completes, you can preview the resulting site locally using built-in web server.
2015-06-26 09:09:29 +03:00
2015-11-18 13:10:40 +03:00
docfx serve _site
2015-11-17 22:53:04 +03:00
This will start the local preview on localhost:8080. You can then view the changes by going to http://localhost:8080/docs/[path] (i.e. http://localhost:8080/docs/getting-started/).
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-11-17 22:53:04 +03:00
Author information is kept in the Markdown file itself. Each author should have a link to an online presence for himself/herself.
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.
2015-11-17 22:53:04 +03:00
Be sure to follow the proper Markdown syntax. If you have code samples,
2015-11-19 04:32:10 +03:00
place them in a folder within the `/samples/` folder. For writing guidelines, see
2015-11-19 01:04:05 +03:00
[our style guide ](/styleguide.md )
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-18 13:10:40 +03:00
See the [Samples Readme ](https://github.com/dotnet/core-docs/blob/master/samples/README.md ).