You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 20, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+28-21Lines changed: 28 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,48 +1,50 @@
1
1
# Contributing to the Blazor documentation
2
2
3
-
This document covers the process for contributing to the articles and code samples that are hosted on thehttp://blazor.net. Contributions may be as simple as typo corrections or as complex as new articles.
3
+
This document covers the process for contributing to the articles and code samples that are hosted athttp://blazor.net. Contributions may be as simple as typo corrections or as complex as new articles.
4
4
5
5
## How to make a simple correction or suggestion
6
6
7
-
Articles are stored in the repository as Markdown files. Simple changes to the content of a Markdown file can be made in the browser by selecting the **Improve this Doc** link in the upperright corner of the browser window, editing the doc on GitHub, and then submitting a pull request (PR) for the change. We will review the PR and accept it or suggest changes.
7
+
Articles are stored in the repository as markdown files. Simple changes to the content of a markdown file can be made in the browser by selecting the **Improve this Doc** link in the upper-right corner of the browser window, editing the doc on GitHub, and then submitting a pull request (PR) for the change. We will review the PR and accept it or suggest changes.
8
8
9
9
## How to make a more complex submission
10
10
11
11
You'll need a basic understanding of [Git and GitHub.com](https://guides.github.com/activities/hello-world/).
12
12
13
-
* Open an [issue](https://github.com/aspnet/Blazor.Docs/issues/new) describing what you want to do, such as change an existing article or create a new one. Wait for approval from the team before you invest much time.
13
+
* Open an [issue](https://github.com/aspnet/Blazor.Docs/issues/new) describing what you want to do, such as change an existing article or create a new one. Wait for approval from the team before you invest much time. We usually request an outline for a new topic proposal.
14
14
* Fork the [aspnet/Blazor.Docs](https://github.com/aspnet/Blazor.Docs/) repo and create a branch for your changes.
15
15
* Submit a pull request (PR) to master with your changes.
16
16
* If your PR has the label 'cla-required' assigned, [complete the Contribution License Agreement (CLA)](https://cla.dotnetfoundation.org/)
17
17
* Respond to PR feedback.
18
18
19
19
## Markdown syntax
20
20
21
-
Articles are written in [DocFx-flavored Markdown](http://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html), which is a superset of [GitHub-flavored Markdown (GFM)](https://guides.github.com/features/mastering-markdown/). For examples of DFM syntax for UI features commonly used in the Blazor documentation, see [Metadata and Markdown Template](https://github.com/dotnet/docs/blob/master/styleguide/template.md) in the .NET repo style guide.
21
+
Articles are written in [DocFx-flavored Markdown (DFM)](http://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html), which is a superset of [GitHub-flavored Markdown (GFM)](https://guides.github.com/features/mastering-markdown/). For examples of DFM syntax for UI features commonly used in the Blazor documentation, see [Metadata and Markdown Template](https://github.com/dotnet/docs/blob/master/styleguide/template.md) in the .NET repo style guide.
22
22
23
23
## Folder structure conventions
24
24
25
-
For each Markdown file there may be a folder for images and a folder for sample code. For example, if the article is *tutorials/build-your-first-blazor-app.md*, the images are in *tutorials/build-your-first-blazor-app/\_static* and the sample application project files are in *tutorials/build-your-first-blazor-app/sample*. An image in the *tutorials/build-your-first-blazor-app.md* file is rendered by the following Markdown.
25
+
For each markdown file, there may be a folder for images and a folder for sample code. For example, if the article is *tutorials/build-your-first-blazor-app.md*, the images are in *tutorials/build-your-first-blazor-app/\_static* and the sample app project files are in *tutorials/build-your-first-blazor-app/samples/2.x* (for a 2.x versioned sample). An image in the *tutorials/build-your-first-blazor-app.md* file is rendered by the following markdown.
26
26
27
27
```
28
-

28
+

29
29
```
30
30
31
31
**All** images should have [alt text](https://wikipedia.org/wiki/Alt_attribute).
32
32
33
-
Markdown file names and image file names should be all lower case.
33
+
Markdown file names and image file names should be all lower case. Use dashes to separate words in file names.
34
34
35
35
## Internal links
36
36
37
37
Internal links should use the `uid` of the target article with an xref link:
38
38
39
-
`[link_text](xref:uid_of_the_topic)`
39
+
```
40
+
[link_text](xref:uid_of_the_topic)
41
+
```
40
42
41
-
See [DocFX Cross Reference](http://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#cross-reference) for more info.
43
+
For more informatin, see the [DocFX Cross Reference](http://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#cross-reference).
42
44
43
45
## Code snippets
44
46
45
-
Articles frequently contain code snippets to illustrate points. DFM lets you copy code into the Markdown file or refer to a separate code file. We prefer to use separate code files whenever possible, to minimize the chance of errors in the code. The code files should be stored in the repo using the folder structure described above for sample projects.
47
+
Articles frequently contain code snippets to illustrate points. DFM lets you copy code into the Markdown file or refer to a separate code file. We prefer to use separate code files whenever possible to minimize the chance of errors in the code. The code files should be stored in the repo using the folder structure described above for sample projects.
46
48
47
49
Here are some examples of [DFM code snippet syntax](http://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#code-snippet) that would be used in a *tutorials/build-your-first-blazor-app.md* file.
48
50
@@ -59,7 +61,7 @@ To render a portion of a file as a snippet by using line numbers:
For C# snippets, you can reference a [C# region](https://docs.microsoft.com/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-region). Whenever possible, use regions rather than line numbers, because line numbers in a code file tend to change and get out of sync with line number references in Markdown. C# regions can be nested, and if you reference the outer region, the inner `#region` and `#endregion` directives are not rendered in a snippet.
64
+
For C# snippets, you can reference a [C# region](https://docs.microsoft.com/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-region). Whenever possible, use regions rather than line numbers because line numbers in a code file tend to change and become out of sync with line number references in markdown. C# regions can be nested; and if you reference the outer region, the inner `#region` and `#endregion` directives aren't rendered in a snippet.
63
65
64
66
To render a C# region named "snippet_Example":
65
67
@@ -78,27 +80,32 @@ To highlight selected lines in a rendered snippet (usually renders as yellow bac
78
80
79
81
## Test your changes with DocFX
80
82
81
-
Test your changes with the [DocFX command-line tool](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool), which creates a locallyhosted version of the site. DocFX doesn't render style and site extensions created for docs.microsoft.com.
83
+
Test your changes with the [DocFX command-line tool](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool), which creates a locally-hosted version of the site. DocFX doesn't render style and site extensions created for docs.microsoft.com.
82
84
83
-
DocFX requires the .NET Framework on Windows, or Mono for Linux or macOS.
85
+
DocFX requires the .NET Framework on Windows or Mono for Linux/macOS.
84
86
85
87
### Windows instructions
86
88
87
89
* Download and unzip *docfx.zip* from [DocFX releases](https://github.com/dotnet/docfx/releases).
88
90
* Add DocFX to your PATH.
89
-
* In a command-line window, navigate to root of the repo (where the *docfx.json* file resides) and run the following command:
91
+
* In a console window, navigate to root of the repo (where the *docfx.json* file resides) and run the following command:
90
92
91
-
```
92
-
docfx --serve
93
-
```
93
+
```
94
+
docfx --serve
95
+
```
94
96
95
97
* In a browser, navigate to `http://localhost:8080`.
96
98
97
99
### Mono instructions
98
100
99
-
* Install Mono via Homebrew - `brew install mono`.
101
+
* Install Mono via Homebrew:
102
+
103
+
```
104
+
brew install mono
105
+
```
106
+
100
107
* Download the [latest version of DocFX](https://github.com/dotnet/docfx/releases).
101
-
* Extract to `\bin\docfx`.
108
+
* Extract the archive to */bin/docfx*.
102
109
* Create an alias for **docfx**:
103
110
104
111
```
@@ -111,11 +118,11 @@ DocFX requires the .NET Framework on Windows, or Mono for Linux or macOS.
111
118
}
112
119
```
113
120
114
-
* Run **docfx** from the root of the repo to build the site, and **docfx-serve** to view the site at `http://localhost:8080`.
121
+
* Run `docfx` from the root of the repo to build the site, and `docfx-serve` to view the site at `http://localhost:8080`.
115
122
116
123
## Voice and tone
117
124
118
-
Our goal is to write documentation that is easily understandable by the widest possible audience. To that end we have established guidelines for writing style that we ask our contributors to follow. For more information, see [Voice and tone guidelines](https://github.com/dotnet/docs/blob/master/styleguide/voice-tone.md) in the .NET repo.
125
+
Our goal is to write documentation that is easily understandable by the widest possible audience. To that end, we've established guidelines for writing style that we ask our contributors to follow. For more information, see [Voice and tone guidelines](https://github.com/dotnet/docs/blob/master/styleguide/voice-tone.md) in the .NET repo.
0 commit comments