2016-05-12 21:57:48 +00:00
# Standard Readme
2015-12-27 21:01:27 +00:00
[![ ](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square )](http://ipn.io)
[![ ](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square )](http://ipfs.io/)
2015-12-28 21:59:34 +00:00
[![ ](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square )](http://webchat.freenode.net/?channels=%23ipfs)
2015-12-27 21:01:27 +00:00
2016-05-12 22:00:56 +00:00
> Readme Standard Style
2015-12-27 21:01:27 +00:00
2016-05-12 21:26:29 +00:00
This repo is for standardizing how READMEs should look. The goal is to have:
- A well defined specification that other people could look to;
- An example README that can be used for comparison (this README.md is the example);
- A linter that can be used to look at errors in a given Readme;
- A generator that can be used to quickly scaffold out new READMEs.
2015-12-27 23:13:58 +00:00
2016-05-12 21:26:29 +00:00
** Table of Contents **
2016-05-13 16:20:03 +00:00
- [Installation ](#installation )
2016-05-12 21:26:29 +00:00
- [Usage ](#usage )
- [Specification ](#specification )
- [Requirements ](#requirements )
- [Sections ](#sections )
2016-05-13 16:20:03 +00:00
- [Title ](#title )
- [Banner ](#banner )
- [Badges ](#badges )
- [Short Description ](#short-description )
- [Long Description ](#long-description )
2016-05-12 21:26:29 +00:00
- [Table of Contents ](#table-of-contents )
2016-05-13 16:20:03 +00:00
- [Security ](#security )
- [Background section ](#background-section )
- [Installation ](#installation-1 )
2016-05-12 21:26:29 +00:00
- [Usage Section ](#usage-section )
2016-05-13 16:20:03 +00:00
- [Extra Sections ](#extra-sections )
2016-05-12 21:26:29 +00:00
- [API ](#api )
2016-05-13 16:20:03 +00:00
- [Contribute ](#contribute-1 )
2016-05-12 21:26:29 +00:00
- [License ](#license )
2016-05-13 16:20:03 +00:00
- [Contribute ](#contribute )
2016-05-12 21:26:29 +00:00
- [License ](#license-1 )
2016-05-13 16:20:03 +00:00
## Background
Standard Readme started with in the issue originally posed by [@maxogden ](https://github.com/maxogden ) over at [feross/standard ](https://github.com/feross/standard ) in [this issue ](https://github.com/feross/standard/issues/141 ). A lot of that discussion ended up in [zcei's standard-readme ](https://github.com/zcei/standard-readme/issues/1 ) repository. While working on maintaining the [IPFS ](https://github.com/ipfs ) repositories, I needed a way to standardize Readmes. This is a result of that.
### Goals:
1. A well defined **specification** . This can be found in the [Specification ](#specification ) section. It is a constant work in progress; please open issues to discuss changes.
2. **An example README** . This Readme is fully standard-readme compliant.
3. A **linter** that can be used to look at errors in a given Readme. Please refer to the [tracking issue ](https://github.com/RichardLitt/standard-readme/issues/5 ).
4. A generator that can be used to quickly scaffold out new READMEs. Please refer to the [tracking issue ](https://github.com/RichardLitt/standard-readme/issues/6 ).
5. A compliant badge.
2016-05-12 21:26:29 +00:00
## Installation
2016-05-12 22:10:19 +00:00
This project uses [node][] and [npm][]. Go check them out if you don't have them locally installed.
2016-05-12 21:26:29 +00:00
```sh
2016-05-13 16:20:03 +00:00
$ npm i -g standard-readme
2016-05-12 21:26:29 +00:00
```
2015-12-27 23:13:58 +00:00
## Usage
2016-05-13 16:20:03 +00:00
Currently, this is only a Readme spec.
2015-12-27 23:13:58 +00:00
2016-05-13 16:20:03 +00:00
```
$ standard-readme
// Will output spec (this Readme)
```
2015-12-27 23:13:58 +00:00
2016-05-12 21:26:29 +00:00
## Specification
### Requirements
A compliant README must:
- Be called README.md (with capitalization).
- Be a valid Markdown file.
2016-05-13 16:20:03 +00:00
- Sections must appear in order delineated below. Optional sections may be omitted.
- Must be new lines between each section.
2016-05-12 21:26:29 +00:00
### Sections
2016-05-13 16:20:03 +00:00
#### Title
**Status:** Required.
**Requirements:**
2016-05-12 21:26:29 +00:00
- Must match repository name. If it cannot, there must be a note in the long description about why.
- Must match package manager name. If it cannot, there must be a note in the long description about why.
2016-05-13 16:20:03 +00:00
**Suggestions:**
- Should be self-evident.
2016-05-12 21:26:29 +00:00
#### Banner
**Status:** Optional.
**Requirements:**
- Must link to local image in current repository.
- Must appear directly after the title.
#### Badges
2016-05-13 16:20:03 +00:00
**Status:** Optional.
2016-05-12 21:26:29 +00:00
**Requirements:**
- Must be newline delimited.
2016-05-12 22:10:19 +00:00
#### Short Description
2016-05-13 16:20:03 +00:00
**Status:** Required.
**Requirements:**
2016-05-12 21:58:32 +00:00
- Must be less than 120 characters.
- Must start with `> `
- Must be on it's own line.
2016-05-12 22:10:19 +00:00
- Must match the description in the packager manager's `description` field.
2016-05-12 21:58:32 +00:00
- Must match GitHub's description (if on GitHub).
**Suggestions:**
- Use [gh-description ](https://github.com/RichardLitt/gh-description ) to set and get GitHub description.
2016-05-12 22:10:19 +00:00
- Use `npm show . description` to show the description from a local [npm][] package.
2016-05-12 21:26:29 +00:00
2016-05-13 16:20:03 +00:00
#### Long Description
**Status:** Optional.
**Requirements:**
- Must have no heading.
**Suggestions:**
- If too long, consider moving to the [Background ](#background ) section.
- Cover the main reasons for building the repository.
2016-05-12 21:26:29 +00:00
#### Table of Contents
2016-05-13 16:20:03 +00:00
**Status:** Required.
**Requirements:**
- Must link to all Markdown sections in the file.
- Must not have a Markdown header, `####` , but must be in bold, on it's own line.
- Must start with the next section; do not include the title.
#### Security
**Status**: Optional.
**Requirements:**
- May go here if visibility of security section is important. Otherwise, should be in [Extra Sections ](#extra-sections ).
#### Background section
**Status:** Optional.
**Requirements:**
- Cover motivation.
- Cover abstract dependencies.
2016-05-13 16:28:41 +00:00
- Cover intellecutal provenance: A `See Also` section is also fitting.
2016-05-13 16:20:03 +00:00
#### Installation
**Status:** Required.
**Requirements:**
- Code block illustrating how to install.
Subsections:
- `Dependencies` . Required if necessary.
- `Updating` . Optional.
**Suggestions:**
- Link to prerequisite sites for language. [npmjs][], [godocs][], etc.
- Include any system-specific information needed for Installation.
- Subsection for dependencies needed for install to work.
2016-05-12 21:26:29 +00:00
#### Usage Section
2016-05-13 16:20:03 +00:00
**Status:** Required.
**Requirements:**
- Code block illustrating common usage.
- If CLI compatible, code block indicating common usage.
- If importable, code block indicating both import functionality and usage.
Subsections:
- `CLI` . Required if CLI functionality exists.
2016-05-13 16:28:41 +00:00
- If relevant, point to a runnable file for the usage code.
2016-05-13 16:20:03 +00:00
**Suggestions:**
- Cover basic choices that may affect usage: for instance, if JavaScript, cover promises/callbacks, ES6 here.
#### Extra Sections
**Status**: Optional.
**Requirements:**
- None.
2016-05-12 21:26:29 +00:00
#### API
2016-05-13 16:20:03 +00:00
**Status:** Optional.
**Requirements:**
2016-05-13 16:28:41 +00:00
- Describe exported functions and objects.
2016-05-12 21:26:29 +00:00
2016-05-13 16:20:03 +00:00
**Suggestions:**
- Describe signatures, return types, callbacks, and events.
2016-05-13 16:28:41 +00:00
- Cover types covered where not obvious.
2016-05-13 16:20:03 +00:00
- Describe caveats.
#### Contribute
**Status**: Required.
**Requirements:**
- Link to `CONTRIBUTE.md` file if there is one.
- State where users can ask questions.
- State whether PRs are accepted.
- List any requirements for contributing; for instance, having a sign-off on commits.
**Suggestions:**
- Be as friendly as possible.
- Link to the GitHub issues.
2016-05-12 21:26:29 +00:00
#### License
2016-05-13 16:20:03 +00:00
**Status:** Required.
**Requirements:**
- State license initials or name.
- State license owner.
- Must be last section.
2016-05-12 21:26:29 +00:00
2016-05-13 16:20:03 +00:00
**Suggestions:**
- Link to longer License file in local repository.
2016-05-12 21:26:29 +00:00
2016-05-13 16:20:03 +00:00
## Contribute
Feel free to dive in! [Open an issue ](https://github.com/RichardLitt/standard-readme/issues/new ) or submit PRs.
2016-05-12 21:26:29 +00:00
2015-12-27 23:13:58 +00:00
## License
2015-12-28 16:01:03 +00:00
MIT (c) Protocol Labs
2016-05-12 22:10:19 +00:00
[node]: http://nodejs.org
2016-05-12 22:11:29 +00:00
[npm]: https://npmjs.com