Skip to content

[Feature] Relative weighing of pages #67

@chipzoller

Description

@chipzoller

I have checked all the prerequisites below and I'm yet experiencing a problem

  • Read the README.md
  • Have the extended version of Hugo installed
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions