Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main menu items ordering #18

Open
assenovg opened this issue May 4, 2021 · 1 comment
Open

Main menu items ordering #18

assenovg opened this issue May 4, 2021 · 1 comment

Comments

@assenovg
Copy link

assenovg commented May 4, 2021

The main menu items are ordered alphabetically. Add "weight" parameter to the .md files, so proper ordering is established.

@Atient
Copy link

Atient commented Jul 28, 2021

You can try to modify the layouts/_default/list.html to order the menu. Just change the line:

{{ range .Pages.ByDate }}

to:

{{ range .Pages.ByParam "weight" }}

Then add the weight param to each .md file like this:

---
title: test
author: atient
type: post
weight: 1
---

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants