mirror of https://github.com/luizdepra/hugo-coder.git

Jens Rantil
22 hours ago 75b8ebcff506656ce6b53f79ae406032777f2aa4
refs
author Jens Rantil <jens.rantil@gmail.com>
Sunday, November 15, 2026 02:46 +0100
committer GitHub <noreply@github.com>
Sunday, November 15, 2026 02:46 +0100
commit75b8ebcff506656ce6b53f79ae406032777f2aa4
tree de3216112e18565195b70c59bcf92b9cc69879c9 tree | zip | gz
parent 9819f9d41780cf67347c278d2dd2bcf25d22acf6 view | diff
feat: sort the menu items by weight (#1017)

### Prerequisites

Put an `x` into the box(es) that apply:

- [ ] This pull request fixes a bug.
- [ ] This pull request adds a feature.
- [x] This pull request introduces breaking change.

### Description

Sorting menu items is done implicitly by Hugo. Sorting against a generic
struct does not feel like canonical Hugo.

This change is a backwards-incompatible change that risk reordering menu
items if someone has not set proper `weight` attribute on their menu
items defined in `config.toml`.

### Issues Resolved

N/A. I'll let this PR speak for itself.

### Checklist

Put an `x` into the box(es) that apply:

#### General

- [x] Describe what changes are being made
- [x] Explain why and how the changes were necessary and implemented
respectively
- [x] Reference issue with `#<ISSUE_NO>` if applicable

#### Resources

- [x] If you have changed any SCSS code, run `make release` to
regenerate all CSS files

#### Contributors

- [x] Add yourself to `CONTRIBUTORS.md` if you aren't on it already

Co-authored-by: Luiz F. A. de PrĂ¡ <luizdepra@users.noreply.github.com>
1 files modified
4 ■■■■■ changed files
layouts/_partials/header.html 4 ●●●●● diff | view | raw | blame | history