-
Notifications
You must be signed in to change notification settings - Fork 228
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
Open menu in new tab #100
Comments
Hi - This is already covered by the Hugo platform.
|
Am i missing something ? This is what i am trying in config.toml but doesn't seem to work.
|
Yes - it has to be under the [blackfriday] section and not under any other section. |
That would mean - the the behavior would be applied for all the menu items, but we need only specific menus to be target = _blank enabled. If I am wrong, could you please give a bigger example with multiple examples ? |
I got your point. Let me better explain:
[blackfriday]
hrefTargetBlank = true
|
I am also interested in that! It would be very handy to be able to do something like @naveen-vijay detailed, be able to specify how links in the menu should behave:
|
I got you @acidsploit I can implement but it will be kind go workaround.
CC: @pacollins @jpescador Guys, what do you think? |
@dudil Thanks for addressing this question. I think that it would be best to avoid hack-y solutions and wait for there to be a real method presented from Hugo. The easy solution is edit the navbar partial directly and just make that a direct link for your particular version. That being said, I do understand what you guys are wanting to do and how it would make sense, but I'd rather not do a hack-y solution. |
Hi @pacollins - sure, thats make sense and why I asked you to look at it. @naveen-vijay @acidsploit, just to be still able to help out - I made this gist with some instruction on how to set it up to your own site. https://gist.github.com/dudil/edf2b1838c7cc5f1131a3777dbc662a9.html I've tested it local and it is working fine - just make sure to set your baseurl parameter at the config.toml correctly (which in any case is important...) |
Awesome! Thanks for taking the time to write that up. |
My Pleasure :) |
I have just been Googling this as I to want to open some menu links in a new tab. In my workings with Markdown I have used Markdown-it so I use the attrs plugin to do |
Expected Behavior
Blogs, portfolio require the ability to link other project or hosted live demo items to be opened in new tab
Current Behavior
Possible Solution
Under config.toml file there are configuration options like name, url, identifier, weight. If there is a option target = _blank HTML like configuration that would be handy or new-tab = true
Steps to Reproduce or Template with Error (for bugs)
Not Applicable.
Context
Blogs, portfolio require the ability to link other project or hosted live demo items to be opened in new tab
Your Environment
Hugo Version: v0.32.2
Browser: Chrome, Safari
Desktop or Mobile: Both
The text was updated successfully, but these errors were encountered: