Add subcommand section to contributing guidelines (#4025)

client-spec/clarity
fejx 2020-05-10 01:10:23 +02:00 committed by GitHub
parent 545fd940fc
commit 677d76b1af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -71,6 +71,20 @@ As a quick reference, the format of each page should match the following templat
For more detailed page formatting guidelines,
refer to the [style guide](contributing-guides/style-guide.md).
## Subcommands
Many programs use subcommands for separating functionality, which may require their own separate pages.
For instance, `git commit` has its own page, as well as `git push` and many others.
To create a page for a subcommand, the program and subcommand need to be separated with a dash (`-`), so `git-commit.md` is shown when calling `tldr git commit`.
You should always add a base page (e.g. `git`) that describes the program and basic switches like `--version` or `help`.
See these examples for reference:
* [git](pages/common/git.md)
* [git-commit](pages/common/git-commit.md)
* [aws](pages/common/aws.md)
* [aws-s3](pages/common/aws-s3.md)
## Translations
Translation of pages can be done by simply creating the corresponding page within the appropriate language-specific directory, creating that as well if it does not already exist.