compose
compose copied to clipboard
[Feature] Relative weighing of pages
I have checked all the prerequisites below and I'm yet experiencing a problem
- [x] Read the README.md
- [x] Have the extended version of Hugo installed
- [x] Used the exampleSite's config.toml as a reference
Describe the feature
In the Compose theme today, pages are globally weighed to determine ordering in the left-hand navigation pane. This approach makes it quite difficult when adding or extending pages as when a site grows organically. What I suggest as a better approach is to have the pages weighed relative to the sections in which they're located.
For example, in a site composed like this (under /content/docs/
)
$ tree .
.
├── _index.md
├── about
│ ├── architecture.md
│ ├── features.md
│ └── roadmap.md
├── installation
│ ├── _index.md
│ ├── daemonset.md
│ ├── flags.md
│ └── static.md
└── usage
├── _index.md
├── cloud-provider.md
├── equinix.md
├── k3s.md
└── kind.md
The pages under /about
should be weighed only in relation to other pages in /about
and not pages in either /installation
or /usage
. This will probably require that there be another control somewhere in the theme to specify the ordering of those page categories. The ideal location would probably be in the menu.toml
file. Once that's done, the subpages can be weighed relative to each other.
Desktop (please complete the following information):
- OS: N/A
- Browser: N/A