TheFive / osmbc

Open Street Map Blog Collector
MIT License
28 stars 11 forks source link

Open external links in a new tab #971

Closed call-me-matt closed 1 year ago

call-me-matt commented 1 year ago

When users click a link, this is opened in the same tab. As we do not want to lose our readers and to enhance usability - it would be great to add a _blank target to our links when exporting to html.

Alternatively, this plugin allows to globally add this feature - also for our previous posts.

I would prefer a solution without plugin, though.

TheFive commented 1 year ago

Have to look, wether it is configurable in markdown-it, or how to do a modification which is stable against any markdown it updates.

TheFive commented 1 year ago

https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md

search for _blank

call-me-matt commented 1 year ago

Also got feedback that this feature would be good in OSMBC as convenience function for editors who proof read articles.

call-me-matt commented 1 year ago

There is also this plugin: https://www.npmjs.com/package/markdown-it-link-attributes