-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to write documentation #244
base: master
Are you sure you want to change the base?
Changes from all commits
67c83f9
bba1184
0334c94
b3dfbb2
4e612c7
aa8139b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
- Copyright 2017 U.S. Federal Government (in countries where recognized) [email protected] | ||
- Copyright 2018 William Entriken [email protected] | ||
- Copyright 2018 Sean O'Shea [email protected] | ||
- Copyright 2018 Jay Sprout [email protected] | ||
- _Add the copyright date, your name, and email address here. (PLEASE KEEP THIS LINE)_ | ||
|
||
## Note for U.S. Federal Employees | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Writing Good Documentation | ||
|
||
## Introduction | ||
|
||
This is not �How to Open Source� (that�s here) � actually, this may be Step 7 of How to Open Source � but how to write great documentation for your project as it applies to GitHub or Open Source which is to say, how it applies to new users and contributors. | ||
|
||
### Purpose | ||
|
||
Specifically, documentation introduces your project to visitors and provides easy-to-understand instructions for installing and using your project. | ||
|
||
Generally, documentation provides guidance for contributing including your process and requirements for submitting Pull Requests and Issues as well as relatively small tasks like Commit messages. | ||
|
||
Not only does good documentation make your project user-friendly as a product but welcoming as a community. It also makes the community user-friendly by providing standards and guidelines not only for the above tasks but for conduct between community members. | ||
|
||
## Writing a Good README.md | ||
|
||
Your README is the first impression your project makes. Like any other "above the fold" website home page, this is where visitors make the decision to user either the scrollbar or the Back button. You must simultaneously greet visitors with a smile and give your project's elevator pitch. | ||
|
||
### Tips | ||
|
||
- Provide links and explanations for other documentation you may have such as a CONTRIBUTING.md file, tutorials, .md files for individual sections of a relatively large project, and to an online demo or the live app. | ||
- | ||
|
||
## Writing a Good CONTRIBUTING.md | ||
|
||
### Tips | ||
|
||
You might provide contact info for questions when opening an issue isn't appropriate. | ||
|
||
## Writing and Reviewing Pull Requests | ||
|
||
|
||
## Writing Issues and Comments | ||
|
||
A well-written issue includes everything you'd want to know before diving in. The issue might be something as simple as content, a tutorial or screenshot and those are often self-explanatory. | ||
|
||
Bugs, on the other hand, should be described in depth. Include: | ||
|
||
- The expected behavior | ||
- What actually happens instead | ||
- Steps to reproduce the behavior | ||
- Unique circumstances ("it only happens in Windows" or "It only happens in Netscape 7") | ||
|
||
## Attracting Contributors with Labels | ||
|
||
People contribute to open source for many reasons. They may be particularly interested in your project but they may also be searching for _any_ project that is a good fit for their time and skillset. When searching for a project to which they can contribute, potential contributors may filter them by language. They can further filter them by *label* so make your project and issues easy for those people to find in search results and target as a potential fit by labeling your issues. | ||
|
||
### Applying Labels | ||
|
||
While creating a new issue, click the Labels button to the right and choose a label. | ||
|
||
Apply a label to multiple issues at once by selecting the issues' checkboxes under the Issues tab and choosing a label (can you select multiple?) from the Labels menu. | ||
|
||
### Creating Labels | ||
|
||
There are eight default labels including "help wanted", "bug", and "good first issue". | ||
|
||
- "issue-type" (such as "documentation" or "content") [issue-type] bug | ||
- "effort" required (i.e. "small") [effort] <medium> | ||
- "skill-level" (i.e. "beginner") [skill-level] <Intermediate> | ||
|
||
When creating your own, custom labels, make them consisten with how most people have created them to make your Issues as easy to find as possible. | ||
|
||
There are even several newbie-related labels such as "low-hanging fruit", [issue-type] good first issue, and, during October, "Hacktoberfest". | ||
|
||
### Tips | ||
|
||
- Provide guidelines for respect, courtesy, etc. in CONTRIBUTING.md or a "Code of Conduct" file. | ||
- If your project uses multiple languages and skills, you might mention which specific language a potential contributor needs to work on this skill. Otherwise, they may start a task they expect only requires HTML and Javascript but quickly realizes they need some Ruby knowledge or something else the lack of which turns a "small" and "easy" issue into something prohibitive and discouraging. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
title: How to Write Good Open Source Documentation | ||
updated_at: 2018-10-11 | ||
|
||
subnav: | ||
- text: "Purpose of Documentation" | ||
href: "/write-good-oss-documentation.html#purpose" | ||
- text: "Writing a Good README.md" | ||
href: "/write-good-oss-documentation.html#writing-a-good-readmemd" | ||
- text: "Writing a Good CONTRIBUTING.md" | ||
href: "/write-good-oss-documentation.html#writing-a-good-contributingmd" | ||
- text: "Writing Issues and Comments" | ||
href: "/write-good-oss-documentation.html#writing-issues-and-comments" | ||
- text: "Attracting Contributors with Labels" | ||
href: "/write-good-oss-documentation.html#attracting-contributors-with-labels" | ||
- text: "Reviewing Pull Requests" | ||
href: "/write-good-oss-documentation.html#reviewing-pull-requests" | ||
--- | ||
|
||
# Writing Good Documentation | ||
|
||
## Introduction | ||
|
||
### Purpose | ||
|
||
Documentation introduces your project to visitors and provides easy-to-understand instructions for installing and using your project. | ||
|
||
Documentation also provides guidance for contributing including the process and requirements for submitting Pull Requests and Issues as well as any relatively small tasks like Commit messages. | ||
|
||
Not only does good documentation make your project user-friendly as a product but welcoming as a community. It also makes the community user-friendly by providing standards and guidelines not only for the above tasks but for conduct between community members. | ||
|
||
## Writing a Good README.md | ||
|
||
Your README is the first impression your project makes. Like any other "above the fold" content on a website home page, this is where visitors make the decision to user either the scrollbar or the Back button. You must simultaneously greet visitors with a smile and give your project's elevator pitch. | ||
|
||
- Describe your app's purpose | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's change this from "app" to "project" (some of our stuff isn't really "apps") |
||
- Provide basic instructions for use. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably need to expand on this... "use" is a bit vague? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm thinking: what sections typically go in here? What should they say? |
||
|
||
### Tips | ||
|
||
- Provide links and explanations for other documentation you may have such as a CONTRIBUTING.md file, tutorials, other .md files for individual sections of a relatively large project, and to an online demo or the live app itself. | ||
- Include screenshots -- if, for no other reason, to liven it up visually. | ||
|
||
## Writing a Good CONTRIBUTING.md | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need a lot more in this section. Things like:
|
||
|
||
Provide preliminary guidance for Pull Requests such as "All pull requests should be a response to an active issue -- if there is no issue relevant to your contribution, create an issue so we can provide some feedback and nobody's time is wasted (or feelings hurt)." | ||
|
||
### Tips | ||
|
||
You might provide contact info for questions when opening an issue isn't appropriate. | ||
|
||
## Writing Issues and Comments | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's mention that maintainers should create an issue template (and link to how to do that on GH) |
||
|
||
A well-written issue includes everything you'd want to know before diving in. The issue might be something as simple as content, a tutorial or screenshot and those are often self-explanatory. | ||
|
||
Bug issues, on the other hand, should be described in depth. They should include: | ||
|
||
- The expected behavior | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add "If it's an application, what page or screen was it on?" |
||
- What actually happens instead | ||
- Steps to reproduce the behavior | ||
- Unique circumstances ("It only happens in Windows" or "It only happens in Netscape 7") | ||
|
||
## Attracting Contributors with Labels | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's make sure to identify this as GH only, that or state what it's called on other services. We may have people not using github (gitlab, bitbucket, etc) |
||
|
||
People contribute to open source for many reasons. They may be particularly interested in your project but they may also be searching for _any_ project that is a good fit for their time and skillset. When searching for a project to which they can contribute, potential contributors may filter them by language. They can further filter them by *label* so make your project and issues easy for those people to find in search results and target as a potential fit by labeling your issues. | ||
|
||
There are eight default labels including "help wanted", "bug", and "good first issue". You can also create your own custom labels. | ||
|
||
You can apply labels while creating an Issue or apply labels to one or more existing issues. | ||
|
||
### Applying Labels While Creating a New Issue | ||
|
||
While creating a new issue under the Issues tab, click the Labels button (looks like a Settings button or a gear) on the right and choose a label from the menu. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is very GH specific... I think we take this section out. |
||
|
||
<img width="500" height=auto src="https://github.com/jotasprout/code.mil/blob/how-to-write-documentation/src/assets/images/documentation/labelingNewIssue.png"> | ||
|
||
### Applying Labels to Existing Issues | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to above, let's nix this one |
||
|
||
Apply a label to one or more issues by selecting the issues' checkboxes under the Issues tab and choosing a label from the Label menu. | ||
|
||
<img width="500" height=auto src="https://github.com/jotasprout/code.mil/blob/how-to-write-documentation/src/assets/images/documentation/labelMenu.png"> | ||
|
||
### Creating and Applying Custom Labels | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is good, but we need to take away the GH-specific aspect. Can we look at some other services and generalize this? |
||
|
||
Under the Issues tab, click the Labels button. | ||
|
||
<img width="500" height=auto src="https://github.com/jotasprout/code.mil/blob/how-to-write-documentation/src/assets/images/documentation/issuesTab.png"> | ||
|
||
Give your label a name and choose a color. | ||
|
||
<img width="500" height=auto src="https://github.com/jotasprout/code.mil/blob/how-to-write-documentation/src/assets/images/documentation/creatingLabel.png"> | ||
|
||
When creating your own, custom labels, make the names consistent with similar, common labels that others have created so potential contributors can find your Issues as easily as possible. Some common labels are | ||
|
||
- "issue-type" (such as "documentation" or "content") | ||
- "effort" required (i.e. "small") | ||
- "skill-level" (i.e. "beginner") | ||
|
||
Other less common but equally useful labels include: | ||
|
||
- "low-hanging fruit" | ||
- "Hacktoberfest" | ||
|
||
Apply custom labels using the same process as default labels. | ||
|
||
### Tips | ||
|
||
- Provide guidelines for respect, courtesy, etc. in CONTRIBUTING.md or a "Code of Conduct" file. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This item is great, but not really a "tip" for issues IMO. Can we break this out into it's own thing? |
||
- If your project uses multiple languages and skills, you might mention which specific language a potential contributor needs to work on this skill. Otherwise, they may start a task they expect only requires HTML and Javascript but quickly realizes they need some Ruby knowledge or something else the lack of which turns a "small" and "easy" issue into something prohibitive and discouraging. | ||
|
||
## Reviewing Pull Requests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is good, but let's expand this a bunch... why is this important? What should they look for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah... I see you have that below a bit... can we expand anyway? |
||
|
||
Part of this is making sure the PR follows our own documentation, policies, and procedures. | ||
|
||
It is always okay to say "no." | ||
|
||
If the answer is "not yet," see Responding to Pull Requests. | ||
|
||
### Responding to Pull Requests | ||
|
||
- Respond promptly | ||
- Respond, period. Repos with lists of unanswered PRs look bad and uninviting. | ||
- Thank the contributor. | ||
- If you're not accepting the PR, explain why in detail. Link to any relevant documentation. | ||
- If not accepting the PR, provide clear feedback so they can continue working | ||
- Provide feedback, even if you're accepting the PR without changes. A lot of people are contributing as a learning experience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... why is this txt file here? Was this leftover in a commit somehow? Seems duplicative.