2026网站更新记录
2026-05-22
- 优化网站流畅度(玄学)
- 改进mkdocs教程,增加更多示例
2026-03-30
- 优化网站流畅度(玄学)
- 写点东西,修修bug
2026-03-02
- 优化网站流畅度(玄学)
- 改进mkdocs教程,增加更多示例
💬 评论
评论系统加载中...
What is Blog?
博客,仅音译,英文名为Blogger,为Web Log的混成词。
其正式名称为网络日记;又音译为部落格或部落阁等,是社会媒体网络的一部分。是使用特定的软件,在网络上出版、发表和张贴个人文章的人,或者是一种通常由个人管理、不定期张贴新的文章的网站
评论系统加载中...
评论系统加载中...
Look at this source open_in_new_tab.js:
// Description: Open external links in a new tab and PDF links in a new tab
// Source: https://jekyllcodex.org/without-plugin/new-window-fix/
//open external links in a new window
function external_new_window() {
for(let c = document.getElementsByTagName("a"), a = 0;a < c.length;a++) {
let b = c[a];
if(b.getAttribute("href") && b.hostname !== location.hostname) {
b.target = "_blank";
b.rel = "noopener";
}
}
}
//open PDF links in a new window
function pdf_new_window ()
{
if (!document.getElementsByTagName) {
return false;
}
let links = document.getElementsByTagName("a");
for (let eleLink=0; eleLink < links.length; eleLink ++) {
if ((links[eleLink].href.indexOf('.pdf') !== -1)||(links[eleLink].href.indexOf('.doc') !== -1)||(links[eleLink].href.indexOf('.docx') !== -1)) {
links[eleLink].onclick =
function() {
window.open(this.href);
return false;
}
}
}
}
function apply_rules() {
external_new_window();
pdf_new_window();
}
if (typeof document$ !== "undefined") {
// compatibility with mkdocs-material's instant loading feature
// based on code from https://github.com/timvink/mkdocs-charts-plugin
// Copyright (c) 2021 Tim Vink - MIT License
// fixes [Issue #2](https://github.com/JakubAndrysek/mkdocs-open-in-new-tab/issues/2)
document$.subscribe(function() {
apply_rules();
console.log("Applying rules");
})
}
!ENV [CI, false]语句,极大缩短mkdocs serve静态预览时间(3-5s)评论系统加载中...
我们已经在一起
评论系统加载中...
评论系统加载中...