ink
ink copied to clipboard
希望将链接解析为在新页面打开
@KnectBis 因为大部分链接都是站内链接。可以使用 Command / Ctrl 键以新页面方式打开。
这个问题不必由纸小墨解决。现在有三种方式完成:
-
全局生效:在主题的 head (通常是
_head.html
)中添加<base target="_blank">
,以后博客内的所有链接都会变为新页面打开; -
页面级生效:在需要生效的文章中添加以下部分:
如果需要多次使用,可以保存为<script type="text/javascript"> $(function () { $(document.links).attr('target', '_blank') }) </script>
.js
脚本引入; -
单句生效:直接使用
<a href="http://example.com/" target="_blank">Hello, world!</a>
即可。