diff --git a/_templates/md-viewer.html b/_templates/md-viewer.html
index 2532ae4..15004e0 100644
--- a/_templates/md-viewer.html
+++ b/_templates/md-viewer.html
@@ -6,6 +6,7 @@
文档预览
+
';
@@ -136,13 +171,25 @@ if (filePath) {
+ 'links.forEach(function(a){a.classList.remove("active")});if(cur)cur.link.classList.add("active")}'
+ 'window.addEventListener("scroll",update);update()});'
+ '<\/script>';
+ /* iframe 内注入:将 mermaid 代码块转换为图形 */
+ const mermaidScript = '
-