okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
251 stars 134 forks source link

Open repo_button nav link in a new tab/window #846

Open CedricReichenbach opened 3 years ago

CedricReichenbach commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST?: feature

What happened: repo_button links open in the same tab.

What you expected to happen: It would be nice to be able to specify if they should be opened in a new tab/window (i.e. target=_blank).

How to reproduce it (as minimally and precisely as possible): Configure a repo_button on a "nav" fragment, then click it.

Environment:

stp-ip commented 3 years ago

Generally I think this might be something to use an edited "nav" fragment as a custom fragment. There are already quite a few configuration options and enabling link target for all links seems too open.

Happy to discuss this so.

CedricReichenbach commented 3 years ago

enabling link target for all links seems too open

I'm not sure I fully understand; would this mean all non-content/markdown links would be configurable with a target? In fact, I think this would be a good thing, as long as the default is leaving it unset.

For the repo link in particular, one could even argue to make it target="_blank" altogether, but obviously this would be a change in behavior and certainly some people would disagree.

stp-ip commented 3 years ago

Adding that option multiplies the varieties of the options and complicates the code as well. Currently my stance is that the complexity for that specific feature isn't warranted especially as once can duplicate the navigation fragment and add it in as a custom fragment instead. See: https://about.okkur.org/syna/docs/fragments/#custom-fragments