Skip to content

Ordering Items in Sections #1959

Closed as not planned
Closed as not planned
@halostatue

Description

@halostatue

I'm documenting a parsing grammar with @type and @typedoc, and I’d like to be able to change the order of the types section so that it isn't alphabetical. I was thinking something similar to the @doc meta: value approach could be used with a new configuration option:

# in a module
@doc order: 1
def foo…

@doc order: 2
def bar…
# in mix.exs
    functions_order_by: & if(&1[:order], do: &1[:order], else: &1),
    types_order_by: & if(&1[:order], do: &1[:order], else: &1)

I’m not sure if anyone else would want this, but it would allow for more thematic ordering to the documentation whether grouping is used or not (the order would be applied to the group the items appear in). As an alternative, something like order_in_section: :sort (the current behaviour) or order_in_section: :manual (the order in which they appear in the document).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions