@@ -109,21 +109,21 @@ its children that have the `@nodoc` tag in the documentation comment.
109
109
110
110
### dartdoc_options.yaml
111
111
112
- Creating a file named dartdoc_options.yaml at the top of your package can change how Dartdoc
112
+ Creating a file named ` dartdoc_options.yaml ` at the top of your package can change how Dartdoc
113
113
generates docs.
114
114
115
115
An example (not necessarily recommended settings):
116
116
117
117
``` yaml
118
118
dartdoc :
119
119
categories :
120
- " First Category " :
120
+ awesome :
121
121
markdown : doc/First.md
122
- name : Awesome
123
- " Second Category " :
122
+ displayName : Awesome
123
+ great :
124
124
markdown : doc/Second.md
125
- name : Great
126
- categoryOrder : ["First Category", "Second Category" ]
125
+ displayName : Great
126
+ categoryOrder : [awesome, great ]
127
127
includeExternal : ['bin/unusually_located_library.dart']
128
128
nodoc : ['lib/sekret/*.dart']
129
129
linkTo :
@@ -137,17 +137,20 @@ dartdoc:
137
137
- tool-error
138
138
` ` `
139
139
140
- #### dartdoc_options.yaml fields
140
+ #### ` dartdoc_options.yaml` fields
141
141
142
142
In general, **paths are relative** to the directory of the `dartdoc_options.yaml` file in which the option
143
143
is defined, and should be specified as POSIX paths. Dartdoc will convert POSIX paths automatically on Windows.
144
144
Unrecognized options will be ignored. Supported options :
145
145
146
- * **categories**: More details for each category/topic. For topics you'd like to document, specify
147
- the markdown file with `markdown:` to use for the category page. Optionally, rename the
148
- category from the source code into a display name with `name:`. If there is no matching category
149
- defined in dartdoc_options.yaml, those declared categories in the source code will be invisible.
150
- * **categoryOrder**: Specify the order of topics for display in the sidebar and
146
+ * **categories**: A map from _category names_ to _category definitions_.
147
+ The _category definition_ consists of a `markdown:` property and an optional `displayName:` property.
148
+ For topics you'd like to document, specify a _markdown file_ to be rendered on the category page,
149
+ using the `markdown:` property.
150
+ Optionally, you may specify a `displayName:` to be used in the rendered HTML, instead of the _category name_.
151
+ Categories are referenced in documentation comments using the `{@category <category name>}` tag.
152
+ Categories with no matching _category name_ defined in `dartdoc_options.yaml` will be invisible.
153
+ * **categoryOrder**: A list of _category names_ specifying the order of topics for display in the sidebar and
151
154
the package page.
152
155
* **exclude**: Specify a list of library names to avoid generating docs for,
153
156
overriding any specified in include. All libraries listed must be local to this package, unlike
@@ -210,12 +213,12 @@ You can tag libraries or top level classes, functions, and variables in their do
210
213
the string `{@category YourCategory}`. For libraries, that will cause the library to appear in a
211
214
category when showing the sidebar on the Package and Library pages. For other types of objects,
212
215
the `{@category}` will be shown with a link to the category page **but only if specified in
213
- dartdoc_options.yaml**, as above.
216
+ ` dartdoc_options.yaml` **, as above.
214
217
215
218
` ` ` dart
216
219
/// Here is my library.
217
220
///
218
- /// {@category Amazing }
221
+ /// {@category awesome }
219
222
library my_library;
220
223
` ` `
221
224
0 commit comments