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

Nav Menu: Enable opening of URL menu item as a new tab or window. #47

Closed
gerbrent opened this issue Jul 7, 2022 · 2 comments
Closed
Assignees
Labels
enhancement New feature, enhancement, or request low priority ... but not necessarily unimportant

Comments

@gerbrent
Copy link
Collaborator

gerbrent commented Jul 7, 2022

Enable opening of URL menu item - for example, https://jupitergarage.com - as a new tab or window, similar to HTML behaviour <a href="https://jupitergarage.com" target="_blank">

A possible quick "hack", since Hugo doesn't seem to have this feature yet:

Hugo issue tickets discussing the feature request (never implemented):

@StefanS-O
Copy link
Collaborator

StefanS-O commented Jul 10, 2022

@gerbrent you can now use the identifier in the config to specify if it should open in a new window.
If you use ext- as a prefix it will open in a new page. I did it for the Garage Sale:

[[Menu.Main]]
    name = "Garage Sale"
    identifier = "ext-garage-sale"
    url = "https://www.jupitergarage.com/"
    weight =60

Please close the ticket if you like it this way.

@StefanS-O StefanS-O assigned gerbrent and unassigned StefanS-O Jul 10, 2022
@gerbrent
Copy link
Collaborator Author

amazing hack! Still can't believe this isn't built in...

Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, enhancement, or request low priority ... but not necessarily unimportant
Projects
None yet
Development

No branches or pull requests

2 participants