vantagedesign / ace-documentation

A free documentation theme for Hugo, powered by Bootstrap 4. Repsonsive, search, code highlighting and more.
https://docs.vantage-design.com/ace/
MIT License
101 stars 74 forks source link

Clicking on a link opens up the page in a new tab. #32

Closed PRUBHTEJ closed 3 years ago

PRUBHTEJ commented 3 years ago

Is there an option using which, there is a possibility that when the user clicks a particular link, it opens that particular link in a new tab?

PRUBHTEJ commented 3 years ago

Hope to hear from you soon.

julianflapper commented 3 years ago

@PRUBHTEJ use an anchor tag with target="_blank":

< a href="google.com" target="_blank"></a>
PRUBHTEJ commented 3 years ago

Where should I insert this, so that this works on all the pages?

julianflapper commented 3 years ago

This is for a single link on a page. It does not work on menu's and such. If you want it on menu's, modify the links in the theme's partials for the menu and navbar to also include target blank.

PRUBHTEJ commented 3 years ago

Yes, so I want it for all the links, so then what should be the procedure?

julianflapper commented 3 years ago

https://github.com/vantagedesign/ace-documentation/blob/master/layouts/partials/menu.html

So in partials like this, add target blank to the elements.

PRUBHTEJ commented 3 years ago

Great! Thank you so much @julianflapper!