forked from badges/shields
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for designing badge URLs (badges#4435)
* Add documentation for designing badge URLs Co-authored-by: Caleb Cartwright <[email protected]>
- Loading branch information
Showing
3 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Badge URL Conventions | ||
|
||
- The format of new badges should be of the form `/SERVICE/NOUN/PARAMETERS?QUERYSTRING` e.g: | ||
`/github/issues/:user/:repo`. The service is github, the | ||
badge is for issues, and the parameters are `:user/:repo`. | ||
- Parameters should always be part of the route if they are required to display a badge e.g: `:packageName`. | ||
- Common optional params like, `:branch` or `:tag` should also be passed as part of the route. | ||
- Query string parameters should be used when: | ||
- The parameter is related to formatting. e.g: `/appveyor/tests/:user/:repo?compact_message`. | ||
- The parameter is for an uncommon optional attribute, like an alternate registry URL. | ||
- The parameter triggers application of alternative logic, like version semantics. e.g: `/github/v/tag/:user/:repo?sort=semver`. | ||
- Services which require a url/hostname parameter always should use a query string parameter to accept that value. e.g: `/discourse/topics?server=https://meta.discourse.org`. | ||
|
||
It is convention to use the following standard routes and abbreviations across services: | ||
|
||
- Coverage: `/coverage` | ||
- Downloads or Installs: | ||
- Total: `/dt` - Use this even for services that only provide the total download/install data | ||
- Per month: `/dm` | ||
- Per week: `/dw` | ||
- Per day: `/dd` | ||
- Rating: | ||
- Numeric: `/rating` | ||
- Stars: `/stars` | ||
- License: `/l` | ||
- Version or Release: `/v` |