backstage / backstage/mkdocs-monorepo-plugin

[feature] Add a sorting option for `*include`

Open
#124 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
400
Forks
80
PR merge metrics
No merged PRs in 30d

Description

# Summary
Request to add a sorting option when including folders through the `*include` syntax
# Details
When including a set of folder using the `*include` syntax, they are added to the nav in lexicographic (default order of `ls`, I think).
I'd like to have some way to sort the entries in a different order, a couple of simple flags should be enough.
# Proposal
Just as an example, I can suggest something like this:
```yaml
# /mkdocs.yml
site_name: Cats System

nav:
- Intro: 'index.md'
- Components: '*include -n -r ./components/*/mkdocs.yml'
```
Where `-n` means using numerical order and `-r` means reverse order (same flags as `ls`)

Contributor guide

Open the contributing guide

Research direction

Start by locating the handler for the `*include` syntax and review the example in `mkdocs.yml`. Determine how included folders currently receive their lexicographic order, then verify that the requested numerical and reverse ordering behavior is defined and testable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.