Add icon to external links
Opened this issue · 2 comments
timvink commented
It would be cool if you could add an option to enable adding an icon behind links to show that links open in a new tab.
Something like this:
# mkdocs.yaml
plugins:
- search
- open-in-new-tab:
add_icon: true
Then it could look like this:
Mkdocs-material already has a nice set of icons you can choose from
Technically, you would have to add an extra event event that processes and updates either the markdown or the HTML. An example of a plugin that does this is table-reader
JakubAndrysek commented
I have tested adding icons using JS, but it will also add icons next to the images and to the top Github link.
So I will have to modify the generated HTML as you wrote in the previous comment.
More in new external-links-icon branch
timvink commented
Looks great though