Markdown open a new window link
I'm trying to edit a website which uses a modx cms, and it's using Markdown. Now I would like to open a new link into another window.
Is it possible? Thanks
The Link [Registration](http://www.registration.com)
在降价中没有这样的功能,但是您可以随时在标记中使用HTML:
<a href="http://example.com/" target="_blank">example</a>
As suggested by this answer:
[link](url){:target="_blank"}
Works for jekyll or more specifically kramdown, which is a superset of markdown, as part of Jekyll's (default) configuration. But not for plain markdown. ^_^
If one would like to do this systematically for all external links, CSS is no option. However, one could run the following sed
command once the (X)HTML has been created from Markdown:
sed -i 's|href="http|target="_blank" href="http|g' index.html
This can be further automated in a single workflow when a Makefile
with build instructions is employed.
PS: This answer was written at a time when extension link_attributes
was not yet available in Pandoc.
上一篇: 空白“与目标=”
下一篇: Markdown打开一个新的窗口链接