You can use javascript to detect all external links and add target='_blank' attribute to them. Reference internal link without target blank.: /tutorials/hugo/how-to-install-hugo-on-ubuntu/ Markdown applications don’t agree on how to handle a missing space between the number signs ( ) and the heading name. For compatibility, always put a space between the number signs and the heading name. That effectively adds a default target to every anchor element. You should also put blank lines before and after a heading for compatibility. One global solution is to put into your pages element.And add one line of code to your mkdocs.yml. The Markdown syntax for links doesnt allow you to specify the target attribute, but if your Markdown processor supports HTML, you can use HTML to create these. Without blank lines, this might not look right. Just install the plugin using pip from PyPI: pip install mkdocs-open-in-new-tab. Look at the plugin: mkdocs-open-in-new-tab. html: true (markdown-it default is false) The only listed options here are the ones that differ from the default markdown-it options. As far as the Markdown syntax is concerned, if you want to get that detailed, youll just have to use. Plugin opens all outgoing links in a new tab. Markdown Options Jump to heading Default Options Jump to heading. Html create links with targetblank in Markdown. () Output: External link with _target blank () Output: Ref with_target blank (/tutorials/hugo/how-to-install-hugo-on-ubuntu/) Output: Internal link without target blank Output: Reference internal link without target blank. I have created the plugin to do that automatically.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |