From 66eeadb847cc3ff4a6584e73aa975caccf92a954 Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Sun, 1 Nov 2026 13:22:14 +0800 Subject: [PATCH] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 预加载 .txt 文件。 --- website/templates/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/templates/index.html b/website/templates/index.html index 2e9fdd24..23622287 100644 --- a/website/templates/index.html +++ b/website/templates/index.html @@ -11,8 +11,8 @@ // 正文和侧边栏的 Markdown 在 Docsify 载入前就开始下载,Docsify 请求同一地址时直接用下载好的内容 (function () { var path = location.hash.replace(/^#/, '').split('?')[0] || '/'; - var file = path === '/' ? '/README.md' : /^\/notes\/[^.]+$/.test(path) ? path + '.md' : null; - [file, '/_sidebar.md'].forEach(function (href) { + var file = path === '/' ? '/README.txt' : /^\/notes\/[^.]+$/.test(path) ? path + '.txt' : null; + [file, '/_sidebar.txt'].forEach(function (href) { if (!href) return; var link = document.createElement('link'); link.rel = 'preload';