Skip to content
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

README: add rules for writting pages #194

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 21 additions & 6 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cheatsheets
===========
# cheatsheets #
This repository contains community-sourced cheatsheets to be used with
[cheat][] and similar applications.

Expand All @@ -22,10 +21,26 @@ git add --all
git commit -m <message>
```

As a guideline, it is preferred to use [docopt][] syntax when specifying
parameter placeholders. In edge-cases where that syntax may cause confusion, it
is permissible to use placeholder values (`foo.txt`, `example.com`, etc.) as
necessary.
To take a long story short here are our guidelines for cheatsheets:

- If the cheatsheet contains frontmatter, it must be valid.
- Cheatsheets should generally be scoped to a single CLI command (most often POSIX-compatible CLI command).
- It's not always possible. For instance pages describing shell syntax often can't avoid describing
multiple CLI commands as almost everything in traditional shells is a command.
- Don't create pages for CLI commands with a good help system like `fish`, etc because users of them already have
neat completion system/man pages written by other contributors and maintainers.
- Cheatsheets should end with a newline, but not a blank line.
- Code blocks should be separated by a single blank line.
- The comment line should end with a colon: `# To foo the bar:`, rather than `# To foo the bar`.
Note for users coming from `TlDr` project: it's preferred to use `To` at the beggining of the sentence.
- Text should be reduced near to the minimum necessary to do the job. Avoid commentary and context where possible.
- Where possible, cheatsheets should be consistent both internally, and with other sheets.
- Excluding cases where it might cause confusion, commands should generally conform to [docopt][] syntax.
It's better not write complex placeholders containing `<` or `>` inside them to demonstrate for instance how comparison
operators work in `[[`. In such cases the best option is just omit placeholders.
- For path placeholders use `<in-file>`, `<out-file>`, or `<file>`. Almost the same applies to directories
but instead of term `file` `dir` term is used.
- Number placeholders with the following format: `<placeholder-1>` eg. `<in-file-1>`.

### License ###
Cheatsheets are licensed under [Creative Commons CC0 1.0][cc0]. See
Expand Down