@@ -109,21 +109,21 @@ its children that have the `@nodoc` tag in the documentation comment.
109109
110110### dartdoc_options.yaml
111111
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
113113generates docs.
114114
115115An example (not necessarily recommended settings):
116116
117117``` yaml
118118dartdoc :
119119 categories :
120- " First Category " :
120+ awesome :
121121 markdown : doc/First.md
122- name : Awesome
123- " Second Category " :
122+ displayName : Awesome
123+ great :
124124 markdown : doc/Second.md
125- name : Great
126- categoryOrder : ["First Category", "Second Category" ]
125+ displayName : Great
126+ categoryOrder : [awesome, great ]
127127 includeExternal : ['bin/unusually_located_library.dart']
128128 nodoc : ['lib/sekret/*.dart']
129129 linkTo :
@@ -137,17 +137,20 @@ dartdoc:
137137 - tool-error
138138` ` `
139139
140- #### dartdoc_options.yaml fields
140+ #### ` dartdoc_options.yaml` fields
141141
142142In general, **paths are relative** to the directory of the `dartdoc_options.yaml` file in which the option
143143is defined, and should be specified as POSIX paths. Dartdoc will convert POSIX paths automatically on Windows.
144144Unrecognized options will be ignored. Supported options :
145145
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
151154 the package page.
152155 * **exclude**: Specify a list of library names to avoid generating docs for,
153156 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
210213the string `{@category YourCategory}`. For libraries, that will cause the library to appear in a
211214category when showing the sidebar on the Package and Library pages. For other types of objects,
212215the `{@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.
214217
215218` ` ` dart
216219/// Here is my library.
217220///
218- /// {@category Amazing }
221+ /// {@category awesome }
219222library my_library;
220223` ` `
221224
0 commit comments