Skip to content

Commit

Permalink
[feature] external link
Browse files Browse the repository at this point in the history
  • Loading branch information
AIboy996 committed Jun 17, 2024
1 parent 486c3e1 commit 358d2cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/About/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ tags:
> 倒序
## 2024

- 2024年06月17日
- 增加新特性:外链(例如<https://bilibili.yangz.site>)会在新的标签页中打开。

- 2024年06月01日
- 更换文本字体为:`Noto Sans SC`。<p style="font-family:Roboto">mkdocs-material默认字体为Roboto:1lI</p>
- 解决了1lI的区分问题。
Expand Down
3 changes: 3 additions & 0 deletions docs/assets/javascripts/link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
document.querySelectorAll(".md-content a[href *='//']:not(.md-content__button):not(:has(img))").forEach(function(link) {
link.setAttribute('target', '_blank');
});
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ extra_css:
- https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css

extra_javascript:
# 外链的行为
- assets/javascripts/link.js
# 百度的页面访问统计【暂时移除百度的访问统计(加载实在是有点慢】
# - assets/js/baidu.js

Expand Down

0 comments on commit 358d2cc

Please sign in to comment.