Change order of content/menu items
rbcavanaugh opened this issue · comments
Hi @rbcavanaugh
Is it possible to change the order of the content on the page (and the corresponding menu items?)
Currently, we can align the menu items. I will add content alignment in future.
Also - Are the 'plus signs' on the left of the page intentional? Is there a way to remove them?
added option to remove in e26564c
Thanks,
@rbcavanaugh -- I can answer these.
Double plus signs:
In hugo.yaml
, if you have this as true and there is no image, then two columns of + will be on the far left. To fix it, set to false.
bottomImage:
enable: false
Unfortunately, this doesn't fix the wonky spacing.
Menu items:
Toggle the title/link in the header: hugo.yaml
--> navbar --> menus
The order of items in the header is controlled by header.html
The order of the actual sections is controlled by index.html
Hi @rbcavanaugh,
Is it possible to change the order of the content on the page (and the corresponding menu items?)
Yes, you can definitely change the order of the content on the page and the corresponding menu items by adjusting their weight
values in the config.yaml
file.
In Hugo, the weight
property in the config.yaml
file controls the order of navigation items. Items with lower weights appear before those with higher weights.
For example, if you want one item to appear before another, assign it a lower weight
value.
Here’s how you can set it up:
Example config.yaml
Configuration:
Menus:
main:
# Dropdown menu
- identifier: dropdown
title: mainMenu
name: Menu
weight: 1 # This will appear before the Blog item
- identifier: blog
name: Blog
title: Blog posts
url: /blogs
weight: 2 # This will appear after the Menu item
In this configuration:
- The item with
weight: 1
("Menu") will appear before the item withweight: 2
("Blog"). - Adjust the weights as needed to control the exact order of items in your navigation bar.
Visual Example:
I hope this helps!