Skip to content

Commit 0aa5b9a

Browse files
committed
Document how to change the categories in the README & toml
1 parent 9a005a3 commit 0aa5b9a

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,21 @@ follows:
123123
```
124124
cargo test
125125
```
126+
127+
## Categories
128+
129+
The list of categories available on crates.io is stored in
130+
`src/categories.toml`. To propose adding, removing, or changing a category,
131+
send a pull request making the appropriate change to that file as noted in the
132+
comment at the top of the file. Please add a description that will help others
133+
to know what crates are in that category.
134+
135+
For new categories, it's helpful to note in your PR description examples of
136+
crates that would fit in that category, and describe what distinguishes the new
137+
category from existing categories.
138+
139+
After your PR is accepted, the next time that crates.io is deployed the
140+
categories will be synced from this file.
126141
127142
## Deploying & Using a Mirror
128143

src/categories.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
# This is where the categories available on crates.io are defined. To propose
2+
# a change to the categories, send a pull request with your change made to this
3+
# file.
4+
#
5+
# For help with TOML, see: https://github.com/toml-lang/toml
6+
#
7+
# Format:
8+
#
9+
# ```toml
10+
# [slug]
11+
# name = "Display name"
12+
# description = "Give an idea of the crates that belong in this category."
13+
#
14+
# [slug.categories.subcategory-slug]
15+
# name = "Subcategory display name, not including parent category display name"
16+
# description = "Give an idea of the crates that belong in this subcategory."
17+
# ```
18+
#
19+
# Notes:
20+
# - Slugs are the primary identifier. If you make a change to a category's slug,
21+
# crates that have been published with that slug will need to be updated to
22+
# use the new slug in order to stay in that category. If you only change
23+
# names and descriptions, those attributes CAN be updated without affecting
24+
# crates in that category.
25+
# - Slugs are used in the path of URLs, so they should not contain spaces, `/`,
26+
# `@`, `:`, or `.`. They should be all lowercase.
27+
#
28+
129
[development-tools]
230
name = "Development Tools"
331
description = "Ways to make developing in Rust better"

0 commit comments

Comments
 (0)