Skip to content

Extract the adjacency concern #119

@eelcoj

Description

@eelcoj

On Perron's site, I have previous and next methods which allows to navigate through the docs.

Would be nice if this could be abstracted into something reusable for all collections/resource. Maybe an API like:

class Content::Article
  adjacency group_by: :section, order_by: :position 
end

So traversing each resource following the order within the "section". The order of sections needs to be set than as well (which in the above Article resource is done via `SECTIONS).

Not 100% this can be easily abstracted out; if not, this would be a good candidate for the library

Logic might be easier once this is merged #118

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions