File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,8 @@ defmodule ExDoc.Retriever do
148
148
149
149
docs_groups =
150
150
get_docs_groups (
151
- moduledoc_groups ++ config . docs_groups ++ module_data . default_groups ,
151
+ moduledoc_groups ++ config . docs_groups ,
152
+ module_data . default_groups ,
152
153
nodes_groups ,
153
154
docs
154
155
)
@@ -282,13 +283,13 @@ defmodule ExDoc.Retriever do
282
283
end )
283
284
end
284
285
285
- defp get_docs_groups ( module_groups , nodes_groups , doc_nodes ) do
286
+ defp get_docs_groups ( module_groups , default_groups , nodes_groups , doc_nodes ) do
286
287
module_groups = Enum . map ( module_groups , & normalize_group / 1 )
287
-
288
+ default_groups = Enum . map ( default_groups , & normalize_group / 1 )
288
289
# Doc nodes already have normalized groups
289
290
nodes_groups_descriptions = Map . new ( nodes_groups , & { & 1 . title , & 1 . description } )
290
291
291
- normal_groups = module_groups ++ nodes_groups
292
+ normal_groups = module_groups ++ nodes_groups ++ default_groups
292
293
nodes_by_group_title = Enum . group_by ( doc_nodes , & & 1 . group )
293
294
294
295
{ docs_groups , _ } =
Original file line number Diff line number Diff line change @@ -400,10 +400,11 @@ defmodule Mix.Tasks.Docs do
400
400
rules:
401
401
402
402
* First, groups defined as `@moduledoc groups: [...]` in the given order.
403
- * Then groups defined as keys in the `:groups_for_docs` configuration.
404
- * Then default groups: Types, Callbacks and Functions.
405
- * Finally, other groups returned by `:default_group_for_doc` by order of
406
- appearance of their belonging elements.
403
+ * Then groups defined as keys in the `:groups_for_docs` configuration, in the
404
+ given order.
405
+ * Then, other groups returned by `:default_group_for_doc` by alphabetical order
406
+ of their belonging elements (by function name).
407
+ * Finally the default groups: Types, Callbacks and Functions.
407
408
408
409
## Meta-tags configuration
409
410
You can’t perform that action at this time.
0 commit comments