themefisher / airspace-hugo

Airspace Hugo theme for multipurpose use, like Portfolio, Blog, Business.
https://gethugothemes.com/products/airspace/?utm_source=airspace_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
351 stars 508 forks source link

Change & rename the navigation menu #163

Closed phil-pappas closed 3 years ago

phil-pappas commented 3 years ago

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?

salim-b commented 3 years ago

For the main menu:

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

phil-pappas commented 3 years ago

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?

salim-b commented 3 years ago

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
phil-pappas commented 3 years ago

Ah I missed renaming the layours folder! Good catch! Thank you.