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

How to edit main menu? #11

Open
JBGruber opened this issue Jan 9, 2019 · 4 comments
Open

How to edit main menu? #11

JBGruber opened this issue Jan 9, 2019 · 4 comments

Comments

@JBGruber
Copy link

JBGruber commented Jan 9, 2019

Thanks for the really nice minimal theme!

I was trying to edit the main menu (Home • Projects • Blog • About) but I couldn't find out how to do so. I'm using hugo-academic by gcushen on another site and there I can do this in the config.toml:

[[menu.main]]
  name = "Home"
  url = "#about"
  weight = 1

#[[menu.main]]
#  name = "Publications"
#  url = "#publications_selected"
#  weight = 2

The commented "Publications" pane just disappers, menu entries change when I change url or name

But I guess that is just controlling something deeper in the theme (I don't fully understand how theming works unfortunatly). So how does one change the menu if

Home • Projects • Blog • About

is not what is needed?

@theorangepotato
Copy link
Contributor

Moving this functionality to config.toml is probably a good idea, but currently those values are hard-coded in. To change them, edit the following file: themes/minimal-academic/layouts/partials/masthead_nav.html. Add, remove, or edit the existing links as desired. You will have to use HTML instead of Markdown or TOML, but the file is short and should be very straight forward.

Good luck!

@JBGruber
Copy link
Author

Thank you! Not quite sure how I missed that. But I also learned a bit more about hugo themes which is always nice.

Editing this file was no problem at all and it works nicely now.

You can close this if you want or leave it open as a reminder if you intend to move the functionality to the .toml in the future.

@rohitbommisetti
Copy link

rohitbommisetti commented May 27, 2020

@theorangepotato Hi! So I'm currently trying to implement this theme. I've been having trouble with the homepage. I want it to show my latest blog posts like https://www.joshuahu.io/.

How can I change the main homepage? Currently, I see Projects and About but I want it to display my latest blog posts.
image

Thank you!

@theorangepotato
Copy link
Contributor

@rohitbommisetti You might want to open a new issue for this if it is still a problem, as your issue seems to be different.

Also, without seeing your code, it is a little hard to see where you went wrong. Nevertheless, I recommend looking at the example site (particularly the content/ folder) to see a working example. I assume you messed up your folder hierarchy or something. If you copy that exactly, it should show up as you intend, and you can tweak it from there.

Good luck!

(@JBGruber or @jhu247 Feel free to close this issue since it was fixed by PR #12 )

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

3 participants