Closed phil-pappas closed 3 years ago
For the main menu:
Only parent menu elements of nested menus should be defined in config.toml
. In the exampleSite, this applies to the parent menu item named more
. The corresponding entry for EN: https://github.com/themefisher/airspace-hugo/blob/fa0fb1fdebb6a3bab29564461cfbd8197ccdf251/exampleSite/config.toml#L185-L190
Leaf entries linking to content should be defined in the content file's respective front matter; e.g. for the EN project
menu element in content/english/project/_index.md
:
menu:
main:
name: "Project"
weight: 3
The footer menu is (currently) entirely defined in config.toml
. The corresponding lines for EN: https://github.com/themefisher/airspace-hugo/blob/fa0fb1fdebb6a3bab29564461cfbd8197ccdf251/exampleSite/config.toml#L192-L221
Thank you Salim.
It works however it triggers my next problem.
It seems that if you change the name of "Project" menu item, you need to change also the url of http://localhost:1313/project/
. I tried to rename the folder "projects" to "portfolio" but the url in http://localhost:1313/portfolio/
lands me to a page without being able to see the grid gallery view of the projects. What should I change to view the content?
I tried to rename the folder "projects" to "portfolio" but the url in
http://localhost:1313/portfolio/
lands me to a page without being able to see the grid gallery view of the projects. What should I change to view the content?
You would also need to rename the folder layouts/project
to layouts/portfolio
.
But you could also rename the menu entry without changing URLs by simply changing the menu definition in content/english/project/_index.md
to:
menu:
main:
name: "Portfolio"
url: "project"
weight: 3
Ah I missed renaming the layours folder! Good catch! Thank you.
Hi.
I tried to change the navigation menu but it doesnt work.
Specifically I tried to remove a few items from the menu but also tried to rename the "project" to something else and even this didnt work.
In an older version I could edit the nav menu in the config.toml file but not anymore.
What am I doing wrong? Or where should I look at?