Compare commits
159 Commits
feature/li
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
e75417ab50 | ||
|
7794e8d063 | ||
|
ca58969657 | ||
|
e58c34e9db | ||
|
fa3896dc3d | ||
|
0211114475 | ||
|
8c5f901d7e | ||
|
ca075fa7a2 | ||
|
0fd159fa60 | ||
|
5c9ae7b50a | ||
|
552319ebfc | ||
|
3958daa49f | ||
|
a56a3c9e70 | ||
|
9dd6ed6dd9 | ||
|
1c06b0016c | ||
|
7180c59c16 | ||
|
845a854a23 | ||
|
5ee173102e | ||
|
84c2195fae | ||
|
f180c5ab31 | ||
|
ee14e08f90 | ||
|
0180ac135f | ||
|
88d7650a83 | ||
|
83147814d9 | ||
|
7c68d892fd | ||
|
89a52bff26 | ||
|
f8b2069266 | ||
|
eac2dd978e | ||
|
056584dc12 | ||
|
f9a0a3bdd4 | ||
|
f570c3cdd2 | ||
|
095aee7683 | ||
|
0591ce294b | ||
|
36df2792df | ||
|
764aeca383 | ||
|
42f1df9241 | ||
|
c435c2daaf | ||
|
89d405e13a | ||
|
e645c67af8 | ||
|
9e11fce881 | ||
|
19c79f075d | ||
|
03360b3b7e | ||
|
79cf2c2b8a | ||
|
d4e79da598 | ||
|
d05361bb82 | ||
|
8e271642f9 | ||
|
f9fa67cabb | ||
|
1123bb8ba4 | ||
|
13063840cb | ||
|
e7b67cd4cf | ||
|
468156d2b4 | ||
|
1d4049f2fa | ||
|
dee835523b | ||
|
8c49610121 | ||
|
6b6feac2c3 | ||
|
843a252bda | ||
|
bfca987d62 | ||
|
56bc992d05 | ||
|
84b546cb8c | ||
|
28d16eea64 | ||
|
d6dbfd345c | ||
|
250a3f5589 | ||
|
81d40850ef | ||
|
464579f285 | ||
|
f3525d4313 | ||
|
24938bbe2d | ||
|
2048bf8b85 | ||
|
9ad194f59c | ||
|
71d821c045 | ||
|
f5dbb26273 | ||
|
f0ed009d70 | ||
|
e197529e53 | ||
|
9af222044b | ||
|
37e4a6c709 | ||
|
bd16e451ef | ||
|
ae15d345a1 | ||
|
497f0cc946 | ||
|
3213764f74 | ||
|
4e8548cf50 | ||
|
d5b23a5267 | ||
|
1b583d86f3 | ||
|
4cd08e63cc | ||
|
3da360d704 | ||
|
359b36e837 | ||
|
a4ce2a57b5 | ||
|
fc9b7f7cf2 | ||
|
ec8bb37914 | ||
|
e01966c607 | ||
|
f3f43a0016 | ||
|
264ab8b863 | ||
|
8ef8666e1e | ||
|
c5f938af18 | ||
|
8f9adba52b | ||
|
f613fd1afb | ||
|
170d6dc7df | ||
|
16885ebed3 | ||
|
eaec1d4126 | ||
|
13ed550828 | ||
|
7f6d06fad1 | ||
|
4b15f7179c | ||
|
8d74e29490 | ||
|
8fd1e0c680 | ||
|
bc28e71d1f | ||
|
a345eaec5c | ||
|
28c934ef62 | ||
|
a6c15b6b3e | ||
|
c555f1f5d2 | ||
|
f92456b01f | ||
|
494652c923 | ||
|
45b4ca9985 | ||
|
2cc9b5d607 | ||
|
38c80ab16c | ||
|
1bb0e8ea88 | ||
|
da40945e8b | ||
|
23b1a58109 | ||
|
2986c49901 | ||
|
288e7e520c | ||
|
9da157c2c0 | ||
|
c87e8545d6 | ||
|
c571eabff4 | ||
|
73df5c8ac3 | ||
|
da3f4240f6 | ||
|
e0155d7467 | ||
|
2056df4e0f | ||
|
e1f5760875 | ||
|
7b450b3fa1 | ||
|
131e460775 | ||
|
a834b74e3a | ||
|
9d4071e464 | ||
|
7b8f258cf9 | ||
|
e499460a88 | ||
|
0303ca7497 | ||
|
ac39319a60 | ||
|
637341ee96 | ||
|
ca9010b3b4 | ||
|
39fff79e11 | ||
|
f7b2295a48 | ||
|
f7acb59e51 | ||
|
bad0d305b9 | ||
|
052358dbd0 | ||
|
26b7e513a9 | ||
|
f2fe325f7e | ||
|
d083918784 | ||
|
fc941187bf | ||
|
3d0b88a8f3 | ||
|
9d38e0f52c | ||
|
962c15197d | ||
|
8c42cf5e16 | ||
|
ac5c335e00 | ||
|
fa458be910 | ||
|
60c86b72c0 | ||
|
fa01e0ef51 | ||
|
08115c50a5 | ||
|
2d91e3c27c | ||
|
6d2ccf5994 | ||
|
dc3ddbfa19 | ||
|
4d880bb0fa | ||
|
cad48f6543 | ||
|
bf0dc0a6f5 |
12
.remarkrc
12
.remarkrc
@ -1,13 +1,7 @@
|
|||||||
{
|
{
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"remark-title": {},
|
"remark-title": {
|
||||||
"lint": {
|
"title": "IPFS Readme Standard"
|
||||||
"no-multiple-toplevel-headings": true,
|
}
|
||||||
"list-item-indent": false,
|
|
||||||
"maximum-line-length": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"settings": {
|
|
||||||
"commonmark": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
3
LICENSE
3
LICENSE
@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2015 IPFS
|
Copyright (c) 2017-2019 Richard Littauer
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
|
114
README.cn.md
Normal file
114
README.cn.md
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
# 标准 Readme
|
||||||
|
|
||||||
|
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
|
||||||
|
|
||||||
|
标准 Readme 样式
|
||||||
|
|
||||||
|
README 文件是人们通常最先看到的第一个东西。它应该告诉人们为什么要使用、如何安装、以及如何使用你的代码。README 文件标准化能够使得创建和维护 README 文件更加简单。毕竟,要写好一个文档不是那么容易的。
|
||||||
|
|
||||||
|
本仓库包含以下内容:
|
||||||
|
|
||||||
|
1. 一个标准的 README 文件应该是什么样子的[规范](spec.md)。
|
||||||
|
2. 一个用于维护 README 文件的语法提示工具的链接 ([正在进行中](https://github.com/RichardLitt/standard-readme/issues/5))。
|
||||||
|
3. 一个创建标准 README 的[生成器](https://github.com/RichardLitt/generator-standard-readme)。
|
||||||
|
4. 一个指向该规范的[徽章](#徽章)。
|
||||||
|
5. [标准 README 的实例](example-readmes/) - 比如你正在读的这个文件。
|
||||||
|
标准 Readme 是为了开源组件设计的。尽管它的[背景](#背景)是为了服务于 Node 和 npm 项目, 它同时也可以应用到其他编程语言和包管理器中去。
|
||||||
|
|
||||||
|
## 内容列表
|
||||||
|
|
||||||
|
- [背景](#背景)
|
||||||
|
- [安装](#安装)
|
||||||
|
- [使用说明](#使用说明)
|
||||||
|
- [生成器](#生成器)
|
||||||
|
- [徽章](#徽章)
|
||||||
|
- [示例](#示例)
|
||||||
|
- [相关仓库](#相关仓库)
|
||||||
|
- [维护者](#维护者)
|
||||||
|
- [如何贡献](#如何贡献)
|
||||||
|
- [使用许可](#使用许可)
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
`标准 Readme` 最开始因为 [@maxogden](https://github.com/maxogden) 在项目 [feross/standard](https://github.com/feross/standard) 的[这个 Issue](https://github.com/feross/standard/issues/141) 中提出,是否标准化 README 会有助于帮助大家。很多人在仓库 [zcei's standard-readme](https://github.com/zcei/standard-readme/issues/1) 就这个想法进行了讨论。在我维护仓库 [IPFS](https://github.com/ipfs) 的时候,我需要在这个组织中推广标准化的 Readme,因此这个项目也就从这开始了。
|
||||||
|
|
||||||
|
> 如果你的文档是完整的,那么使用你代码的人就不用再去看代码了。这非常的重要。它使得你可以分离接口文档与具体实现。它意味着你可修改实现的代码而保持接口与文档不变。
|
||||||
|
|
||||||
|
> 请记住:是文档而非代码,定义了一个模块的功能。
|
||||||
|
|
||||||
|
—— [Ken Williams, Perl Hackers](http://mathforum.org/ken/perl_modules.html#document)
|
||||||
|
|
||||||
|
写 README 从某种程度上来说相当不易,一直维护下去更是难能可贵。如果可以减少这个过程,则可以让写代码与修改代码更容易,使得是否在说明中指明一处需改有无必要更加清楚,你可以花费更少的时间来考虑是否你最初的文档是否需要更新,你可以分配更多的时间来写代码而非维护文档。
|
||||||
|
|
||||||
|
同时,标准化在某些别的地方也有好处。有了标准化,用户就可以花费更少的时间来搜索他们需要的信息,他们同时可以做一个工具来从描述中搜集信息,自动跑示例代码,检查授权协议等等。
|
||||||
|
|
||||||
|
这个仓库的目标是:
|
||||||
|
|
||||||
|
1. 一个定义良好的**规范**。在仓库中的位置是 [spec.md](spec.md)。它是一个一直在持续优化的文档,欢迎您提 Issue 讨论其中的变化。
|
||||||
|
2. 一个**示例 README**。这个 Readme 完全遵从 Standard-readme,而且在 `example-readmes` 文件夹里有更多的示例。
|
||||||
|
3. 一个**语法提示器**用来提示在 Readme 中的语法错误。请参考 [tracking issue](https://github.com/RichardLitt/standard-readme/issues/5)。
|
||||||
|
4. 一个**生成器**用来快速搭建新的 README 的框架。请参考 [generator-standard-readme](https://github.com/RichardLitt/generator-standard-readme)。
|
||||||
|
5. 一个**标识准守规范的徽章**。请参考[徽章](#徽章)。
|
||||||
|
|
||||||
|
## 安装
|
||||||
|
|
||||||
|
这个项目使用 [node](http://nodejs.org) 和 [npm](https://npmjs.com)。请确保你本地安装了它们。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ npm install --global standard-readme-spec
|
||||||
|
```
|
||||||
|
|
||||||
|
## 使用说明
|
||||||
|
|
||||||
|
这只是一个文档包,你可以打印出 [spec.md](spec.md) 到输出窗口。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ standard-readme-spec
|
||||||
|
# Prints out the standard-readme spec
|
||||||
|
```
|
||||||
|
|
||||||
|
### 生成器
|
||||||
|
|
||||||
|
想要使用生成器的话,请看 [generator-standard-readme](https://github.com/RichardLitt/generator-standard-readme)。
|
||||||
|
有一个全局的可执行文件来运行包里的生成器,生成器的别名叫 `standard-readme`。
|
||||||
|
|
||||||
|
## 徽章
|
||||||
|
如果你的项目遵循 Standard-Readme 而且项目位于 Github 上,非常希望你能把这个徽章加入你的项目。它可以更多的人访问到这个项目,而且采纳 Stand-README。 加入徽章**并非强制的**。
|
||||||
|
|
||||||
|
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
|
||||||
|
|
||||||
|
为了加入徽章到 Markdown 文本里面,可以使用以下代码:
|
||||||
|
|
||||||
|
```
|
||||||
|
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 示例
|
||||||
|
|
||||||
|
想了解我们建议的规范是如何被应用的,请参考 [example-readmes](example-readmes/)。
|
||||||
|
|
||||||
|
## 相关仓库
|
||||||
|
|
||||||
|
- [Art of Readme](https://github.com/noffle/art-of-readme) — 💌 写高质量 README 的艺术。
|
||||||
|
- [open-source-template](https://github.com/davidbgk/open-source-template/) — 一个鼓励参与开源的 README 模板。
|
||||||
|
|
||||||
|
## 维护者
|
||||||
|
|
||||||
|
[@RichardLitt](https://github.com/RichardLitt)。
|
||||||
|
|
||||||
|
## 如何贡献
|
||||||
|
|
||||||
|
非常欢迎你的加入![提一个 Issue](https://github.com/RichardLitt/standard-readme/issues/new) 或者提交一个 Pull Request。
|
||||||
|
|
||||||
|
|
||||||
|
标准 Readme 遵循 [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) 行为规范。
|
||||||
|
|
||||||
|
### 贡献者
|
||||||
|
|
||||||
|
感谢以下参与项目的人:
|
||||||
|
<a href="graphs/contributors"><img src="https://opencollective.com/standard-readme/contributors.svg?width=890&button=false" /></a>
|
||||||
|
|
||||||
|
|
||||||
|
## 使用许可
|
||||||
|
|
||||||
|
[MIT](LICENSE) © Richard Littauer
|
119
README.md
119
README.md
@ -1,30 +1,119 @@
|
|||||||
# readme-standard
|
# Standard Readme
|
||||||
|
|
||||||
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
|
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
|
||||||
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
|
|
||||||
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
|
|
||||||
|
|
||||||
![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)
|
A standard style for README files
|
||||||
|
|
||||||
> Standardize all IPFS Readme.md's and other markdown files
|
Your README file is normally the first entry point to your code. It should tell people why they should use your module, how they can install it, and how they can use it. Standardizing how you write your README makes creating and maintaining your READMEs easier. Great documentation takes work!
|
||||||
|
|
||||||
This repo is for standardizing how readmes should look for IPFS.
|
This repository contains:
|
||||||
|
|
||||||
|
1. [The specification](spec.md) for how a standard README should look.
|
||||||
|
2. A link to a linter you can use to keep your README maintained ([work in progress](https://github.com/RichardLitt/standard-readme/issues/5)).
|
||||||
|
3. A link to [a generator](https://github.com/RichardLitt/generator-standard-readme) you can use to create standard READMEs.
|
||||||
|
4. [A badge](#badge) to point to this spec.
|
||||||
|
5. [Examples of standard READMEs](example-readmes/) - such as this file you are reading.
|
||||||
|
|
||||||
|
Standard Readme is designed for open source libraries. Although it’s [historically](#background) made for Node and npm projects, it also applies to libraries in other languages and package managers.
|
||||||
|
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Background](#background)
|
||||||
|
- [Install](#install)
|
||||||
|
- [Usage](#usage)
|
||||||
|
- [Generator](#generator)
|
||||||
|
- [Badge](#badge)
|
||||||
|
- [Example Readmes](#example-readmes)
|
||||||
|
- [Related Efforts](#related-efforts)
|
||||||
|
- [Maintainers](#maintainers)
|
||||||
|
- [Contributing](#contributing)
|
||||||
|
- [License](#license)
|
||||||
|
|
||||||
|
## Background
|
||||||
|
|
||||||
|
Standard Readme started with 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), about whether or not a tool to standardize readmes would be useful. 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 across that organization. This specification started as a result of that.
|
||||||
|
|
||||||
|
> Your documentation is complete when someone can use your module without ever
|
||||||
|
having to look at its code. This is very important. This makes it possible for
|
||||||
|
you to separate your module's documented interface from its internal
|
||||||
|
implementation (guts). This is good because it means that you are free to
|
||||||
|
change the module's internals as long as the interface remains the same.
|
||||||
|
|
||||||
|
> Remember: the documentation, not the code, defines what a module does.
|
||||||
|
|
||||||
|
~ [Ken Williams, Perl Hackers](http://mathforum.org/ken/perl_modules.html#document)
|
||||||
|
|
||||||
|
Writing READMEs is way too hard, and keeping them maintained is difficult. By offloading this process - making writing easier, making editing easier, making it clear whether or not an edit is up to spec or not - you can spend less time worrying about whether or not your initial documentation is good, and spend more time writing and using code.
|
||||||
|
|
||||||
|
By having a standard, users can spend less time searching for the information they want. They can also build tools to gather search terms from descriptions, to automatically run example code, to check licensing, and so on.
|
||||||
|
|
||||||
|
The goals for this repository are:
|
||||||
|
|
||||||
|
1. A well defined **specification**. This can be found in the [Spec document](spec.md). It is a constant work in progress; please open issues to discuss changes.
|
||||||
|
2. **An example README**. This Readme is fully standard-readme compliant, and there are more examples in the `example-readmes` folder.
|
||||||
|
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. See [generator-standard-readme](https://github.com/RichardLitt/generator-standard-readme).
|
||||||
|
5. A **compliant badge** for users. See [the badge](#badge).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
This project uses [node](http://nodejs.org) and [npm](https://npmjs.com). Go check them out if you don't have them locally installed.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ npm install --global standard-readme-spec
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
The settings are stored in the `.remarkrc` file. Ideally, this file should be added to each repository where
|
This is only a documentation package. You can print out [spec.md](spec.md) to your console:
|
||||||
you plan to use `remark`. There are plans to enable a single `.remarkrc` to be used in multiple repos.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
> npm i -g remark
|
$ standard-readme-spec
|
||||||
> npm i
|
# Prints out the standard-readme spec
|
||||||
> remark README.md -o README.md
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contribute
|
### Generator
|
||||||
|
|
||||||
|
To use the generator, look at [generator-standard-readme](https://github.com/RichardLitt/generator-standard-readme). There is a global executable to run the generator in that package, aliased as `standard-readme`.
|
||||||
|
|
||||||
|
## Badge
|
||||||
|
|
||||||
|
If your README is compliant with Standard-Readme and you're on GitHub, it would be great if you could add the badge. This allows people to link back to this Spec, and helps adoption of the README. The badge is **not required**.
|
||||||
|
|
||||||
|
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
|
||||||
|
|
||||||
|
To add in Markdown format, use this code:
|
||||||
|
|
||||||
|
```
|
||||||
|
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example Readmes
|
||||||
|
|
||||||
|
To see how the specification has been applied, see the [example-readmes](example-readmes/).
|
||||||
|
|
||||||
|
## Related Efforts
|
||||||
|
|
||||||
|
- [Art of Readme](https://github.com/noffle/art-of-readme) - 💌 Learn the art of writing quality READMEs.
|
||||||
|
- [open-source-template](https://github.com/davidbgk/open-source-template/) - A README template to encourage open-source contributions.
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
[@RichardLitt](https://github.com/RichardLitt).
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Feel free to dive in! [Open an issue](https://github.com/RichardLitt/standard-readme/issues/new) or submit PRs.
|
||||||
|
|
||||||
|
Standard Readme follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.
|
||||||
|
|
||||||
|
### Contributors
|
||||||
|
|
||||||
|
This project exists thanks to all the people who contribute.
|
||||||
|
<a href="graphs/contributors"><img src="https://opencollective.com/standard-readme/contributors.svg?width=890&button=false" /></a>
|
||||||
|
|
||||||
Feel free to dive in! Open an issue or submit PRs.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT (c) Protocol Labs
|
[MIT](LICENSE) © Richard Littauer
|
||||||
|
68
example-readmes/maximal-readme.md
Normal file
68
example-readmes/maximal-readme.md
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
# Title
|
||||||
|
|
||||||
|
![banner]()
|
||||||
|
|
||||||
|
![badge]()
|
||||||
|
![badge]()
|
||||||
|
[![license](https://img.shields.io/github/license/:user/:repo.svg)](LICENSE)
|
||||||
|
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
|
||||||
|
|
||||||
|
This is an example file with maximal choices selected.
|
||||||
|
|
||||||
|
This is a long description.
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Security](#security)
|
||||||
|
- [Background](#background)
|
||||||
|
- [Install](#install)
|
||||||
|
- [Usage](#usage)
|
||||||
|
- [API](#api)
|
||||||
|
- [Contributing](#contributing)
|
||||||
|
- [License](#license)
|
||||||
|
|
||||||
|
## Security
|
||||||
|
|
||||||
|
### Any optional sections
|
||||||
|
|
||||||
|
## Background
|
||||||
|
|
||||||
|
### Any optional sections
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
This module depends upon a knowledge of [Markdown]().
|
||||||
|
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
### Any optional sections
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: The `license` badge image link at the top of this file should be updated with the correct `:user` and `:repo`.
|
||||||
|
|
||||||
|
### Any optional sections
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
### Any optional sections
|
||||||
|
|
||||||
|
## More optional sections
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
See [the contributing file](CONTRIBUTING.md)!
|
||||||
|
|
||||||
|
PRs accepted.
|
||||||
|
|
||||||
|
Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
|
||||||
|
|
||||||
|
### Any optional sections
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT © Richard McRichface.](../LICENSE)
|
21
example-readmes/minimal-readme.md
Normal file
21
example-readmes/minimal-readme.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Title
|
||||||
|
|
||||||
|
This is an example file with default selections.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
PRs accepted.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT © Richard McRichface
|
22
index.js
22
index.js
@ -1,22 +0,0 @@
|
|||||||
var mdast = require('remark')
|
|
||||||
var lint = require('remark-lint')
|
|
||||||
var fs = require('graceful-fs')
|
|
||||||
var remarkTitle = require('remark-title')
|
|
||||||
var doc = './README.md'
|
|
||||||
// TODO Replace README with readme option
|
|
||||||
// TODO Log that the title has been replaced
|
|
||||||
|
|
||||||
// fs.writeFileSync(doc, mdast().use(remarkTitle, {}, lint).process(
|
|
||||||
// fs.readFileSync(doc, 'utf8'), function (err, file, res) {
|
|
||||||
// if (err) {
|
|
||||||
// console.log(err)
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (file.messages[0] != null) {
|
|
||||||
// console.log(file.messages)
|
|
||||||
// } else {
|
|
||||||
// console.log('No errors found!')
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// )
|
|
5
package-lock.json
generated
Normal file
5
package-lock.json
generated
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "standard-readme-spec",
|
||||||
|
"version": "1.2.0",
|
||||||
|
"lockfileVersion": 1
|
||||||
|
}
|
48
package.json
48
package.json
@ -1,37 +1,45 @@
|
|||||||
{
|
{
|
||||||
"name": "ipfs-readme-standard",
|
"name": "standard-readme-spec",
|
||||||
"version": "1.0.0",
|
"version": "1.2.0",
|
||||||
"description": "Standardize IPFS Readmes",
|
"description": "A standard style for README files",
|
||||||
"main": "index.js",
|
"bin": "cat.sh",
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
|
||||||
"build": "babel src -d lib"
|
|
||||||
},
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/ipfs/ipfs-readme-standard.git"
|
"url": "git+https://github.com/RichardLitt/standard-readme.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
"standard",
|
||||||
"markdown",
|
"markdown",
|
||||||
"readme",
|
"readme",
|
||||||
"parse",
|
"parse",
|
||||||
"lint",
|
"lint",
|
||||||
"standard"
|
"standard-readme",
|
||||||
|
"spec",
|
||||||
|
"md",
|
||||||
|
"documentation"
|
||||||
],
|
],
|
||||||
"author": "Richard Littauer <richard.littauer@gmail.com> (http://burntfen.com)",
|
"author": {
|
||||||
|
"name": "Richard Littauer",
|
||||||
|
"email": "richard.littauer@gmail.com",
|
||||||
|
"url": "http://burntfen.com"
|
||||||
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/ipfs/ipfs-readme-standard/issues"
|
"url": "https://github.com/RichardLitt/standard-readme/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/ipfs/ipfs-readme-standard#readme",
|
"homepage": "https://github.com/RichardLitt/standard-readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"graceful-fs": "^4.1.3",
|
"opencollective": "^1.0.3"
|
||||||
"mdast-lint": "^2.0.0",
|
|
||||||
"remark": "^4.2.1",
|
|
||||||
"remark-lint": "^3.2.0",
|
|
||||||
"remark-title": "^1.0.3"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"coordinates": [
|
||||||
"babel-cli": "^6.7.5"
|
52.5173031,
|
||||||
|
13.4535065
|
||||||
|
],
|
||||||
|
"collective": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/standard-readme"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"postinstall": "opencollective-postinstall"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
240
spec.md
Normal file
240
spec.md
Normal file
@ -0,0 +1,240 @@
|
|||||||
|
# Specification
|
||||||
|
|
||||||
|
A compliant README must satisfy all the requirements listed below.
|
||||||
|
|
||||||
|
> Note: Standard Readme is designed for open source libraries. Although it's [historically](README.md#background) made for Node and npm projects, it also applies to libraries in other languages and package managers.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Be called README.md (with capitalization).
|
||||||
|
- If the project supports i18n, the file must be named accordingly: `README.de.md`, where `de` is the BCP 47 Language tag. For naming, prioritize non-regional subtags for languages. If there is only one README and the language is not English, then a different language in the text is permissible without needing to to specify the BCP tag: e.g., `README.md` can be in German if there is no `README.md` in another language. Where there are multiple languages, `README.md` is reserved for English.
|
||||||
|
- Be a valid Markdown file.
|
||||||
|
- Sections must appear in order given below. Optional sections may be omitted.
|
||||||
|
- Sections must have the titles listed below, unless otherwise specified. If the README is in another language, the titles must be translated into that language.
|
||||||
|
- Must not contain broken links.
|
||||||
|
- If there are code examples, they should be linted in the same way as the code is linted in the rest of the project.
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
_Note: This is only a navigation guide for the specification, and does not define or mandate terms for any specification-compliant documents._
|
||||||
|
|
||||||
|
- [Sections](#sections)
|
||||||
|
- [Title](#title)
|
||||||
|
- [Banner](#banner)
|
||||||
|
- [Badges](#badges)
|
||||||
|
- [Short Description](#short-description)
|
||||||
|
- [Long Description](#long-description)
|
||||||
|
- [Table of Contents](#table-of-contents-1)
|
||||||
|
- [Security](#security)
|
||||||
|
- [Background](#background)
|
||||||
|
- [Install](#install)
|
||||||
|
- [Usage](#usage)
|
||||||
|
- [Extra Sections](#extra-sections)
|
||||||
|
- [API](#api)
|
||||||
|
- [Maintainers](#maintainers)
|
||||||
|
- [Thanks](#thanks)
|
||||||
|
- [Contributing](#contributing)
|
||||||
|
- [License](#license)
|
||||||
|
- [Definitions](#definitions)
|
||||||
|
|
||||||
|
## Sections
|
||||||
|
|
||||||
|
### Title
|
||||||
|
**Status:** Required.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Title must match repository, folder and package manager names - or it may have another, relevant title with the repository, folder, and package manager title next to it in italics and in parentheses. For instance:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# Standard Readme Style _(standard-readme)_
|
||||||
|
```
|
||||||
|
|
||||||
|
If any of the folder, repository, or package manager names do not match, there must be a note in the [Long Description](#long-description) explaining why.
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- Should be self-evident.
|
||||||
|
|
||||||
|
### Banner
|
||||||
|
**Status:** Optional.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Must not have its own title.
|
||||||
|
- Must link to local image in current repository.
|
||||||
|
- Must appear directly after the title.
|
||||||
|
|
||||||
|
### Badges
|
||||||
|
**Status:** Optional.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Must not have its own title.
|
||||||
|
- Must be newline delimited.
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- Use http://shields.io or a similar service to create and host the images.
|
||||||
|
- Add the [Standard Readme badge](https://github.com/RichardLitt/standard-readme#badge).
|
||||||
|
|
||||||
|
### Short Description
|
||||||
|
**Status:** Required.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Must not have its own title.
|
||||||
|
- Must be less than 120 characters.
|
||||||
|
- Must not start with `> `
|
||||||
|
- Must be on its own line.
|
||||||
|
- Must match the description in the packager manager's `description` field.
|
||||||
|
- Must match GitHub's description (if on GitHub).
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- Use [gh-description](https://github.com/RichardLitt/gh-description) to set and get GitHub description.
|
||||||
|
- Use `npm show . description` to show the description from a local [npm](https://npmjs.com) package.
|
||||||
|
|
||||||
|
### Long Description
|
||||||
|
**Status:** Optional.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Must not have its own title.
|
||||||
|
- If any of the folder, repository, or package manager names do not match, there must be a note here as to why. See [Title section](#title).
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- If too long, consider moving to the [Background](#background) section.
|
||||||
|
- Cover the main reasons for building the repository.
|
||||||
|
- "This should describe your module in broad terms,
|
||||||
|
generally in just a few paragraphs; more detail of the module's
|
||||||
|
routines or methods, lengthy code examples, or other in-depth
|
||||||
|
material should be given in subsequent sections.
|
||||||
|
|
||||||
|
Ideally, someone who's slightly familiar with your module should be
|
||||||
|
able to refresh their memory without hitting "page down". As your
|
||||||
|
reader continues through the document, they should receive a
|
||||||
|
progressively greater amount of knowledge."
|
||||||
|
|
||||||
|
~ [Kirrily "Skud" Robert, perlmodstyle](http://perldoc.perl.org/perlmodstyle.html)
|
||||||
|
|
||||||
|
### Table of Contents
|
||||||
|
**Status:** Required; optional for READMEs shorter than 100 lines.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Must link to all Markdown sections in the file.
|
||||||
|
- Must start with the next section; do not include the title or Table of Contents headings.
|
||||||
|
- Must be at least one-depth: must capture all `##` headings.
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- May capture third and fourth depth headings. If it is a long ToC, these are optional.
|
||||||
|
|
||||||
|
### Security
|
||||||
|
**Status**: Optional.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- May go here if it is important to highlight security concerns. Otherwise, it should be in [Extra Sections](#extra-sections).
|
||||||
|
|
||||||
|
### Background
|
||||||
|
**Status:** Optional.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Cover motivation.
|
||||||
|
- Cover abstract dependencies.
|
||||||
|
- Cover intellectual provenance: A `See Also` section is also fitting.
|
||||||
|
|
||||||
|
### Install
|
||||||
|
**Status:** Required by default, optional for [documentation repositories](#definitions).
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Code block illustrating how to install.
|
||||||
|
|
||||||
|
**Subsections:**
|
||||||
|
- `Dependencies`. Required if there are unusual dependencies or dependencies that must be manually installed.
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- Link to prerequisite sites for programming language: [npmjs](https://npmjs.com), [godocs](https://godoc.org), etc.
|
||||||
|
- Include any system-specific information needed for installation.
|
||||||
|
- An `Updating` section would be useful for most packages, if there are multiple versions which the user may interface with.
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
**Status:** Required by default, optional for [documentation repositories](#definitions).
|
||||||
|
|
||||||
|
**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.
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- Cover basic choices that may affect usage: for instance, if JavaScript, cover promises/callbacks, ES6 here.
|
||||||
|
- If relevant, point to a runnable file for the usage code.
|
||||||
|
|
||||||
|
### Extra Sections
|
||||||
|
**Status**: Optional.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- None.
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- This should not be called `Extra Sections`. This is a space for 0 or more sections to be included, each of which must have their have titles.
|
||||||
|
- This should contain any other sections that are relevant, placed after [Usage](#usage) and before [API](#api).
|
||||||
|
- Specifically, the [Security](#security) section should be here if it wasn't important enough to be placed above.
|
||||||
|
|
||||||
|
### API
|
||||||
|
**Status:** Optional.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Describe exported functions and objects.
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- Describe signatures, return types, callbacks, and events.
|
||||||
|
- Cover types covered where not obvious.
|
||||||
|
- Describe caveats.
|
||||||
|
- If using an external API generator (like go-doc, js-doc, or so on), point to an external `API.md` file. This can be the only item in the section, if present.
|
||||||
|
|
||||||
|
### Maintainer(s)
|
||||||
|
**Status**: Optional.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Must be called `Maintainer` or `Maintainers`.
|
||||||
|
- List maintainer(s) for a repository, along with one way of contacting them (e.g. GitHub link or email).
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- This should be a small list of people in charge of the repo. This should not be everyone with access rights, such as an entire organization, but the people who should be pinged and who are in charge of the direction and maintenance of the repository.
|
||||||
|
- Listing past maintainers is good for attribution, and kind.
|
||||||
|
|
||||||
|
### Thanks
|
||||||
|
**Status**: Optional.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- Must be called `Thanks`, `Credits` or `Acknowledgements`.
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- State anyone or anything that significantly helped with the development of your project.
|
||||||
|
- State public contact hyper-links if applicable.
|
||||||
|
|
||||||
|
### Contributing
|
||||||
|
**Status**: Required.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- 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:**
|
||||||
|
- Link to a CONTRIBUTING file -- if there is one.
|
||||||
|
- Be as friendly as possible.
|
||||||
|
- Link to the GitHub issues.
|
||||||
|
- Link to a Code of Conduct. A CoC is often in the Contributing section or document, or set elsewhere for an entire organization, so it may not be necessary to include the entire file in each repository. However, it is highly recommended to always link to the code, wherever it lives.
|
||||||
|
- A subsection for listing contributors is also welcome here.
|
||||||
|
|
||||||
|
### License
|
||||||
|
**Status:** Required.
|
||||||
|
|
||||||
|
**Requirements:**
|
||||||
|
- State license full name or identifier, as listed on the [SPDX](https://spdx.org/licenses/) license list. For unlicensed repositories, add `UNLICENSED`. For more details, add `SEE LICENSE IN <filename>` and link to the license file. (These requirements were adapted from [npm](https://docs.npmjs.com/files/package.json#license)).
|
||||||
|
- State license owner.
|
||||||
|
- Must be last section.
|
||||||
|
|
||||||
|
**Suggestions:**
|
||||||
|
- Link to longer License file in local repository.
|
||||||
|
|
||||||
|
## Definitions
|
||||||
|
|
||||||
|
_These definitions are provided to clarify any terms used above._
|
||||||
|
|
||||||
|
- **Documentation repositories**: Repositories without any functional code. For instance, [RichardLitt/knowledge](https://github.com/RichardLitt/knowledge).
|
Loading…
Reference in New Issue
Block a user