fix
This commit is contained in:
parent
e6de46809f
commit
89c229fd28
@ -177,10 +177,10 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
results.forEach(doc => {
|
||||
const li = document.createElement("li");
|
||||
const filename = doc.filename || doc.title || "未知文件";
|
||||
const url = doc.url || "";
|
||||
const filepath = doc.filepath?.replace(/^import-data\//, "").replace(/\.md$/, ".html") || "";
|
||||
const mtime = doc.mtime ? formatLocalTime(doc.mtime) : ""; // 格式化时间
|
||||
const link = document.createElement("a");
|
||||
link.href = `${url}`;
|
||||
link.href = doc.url ? doc.url : `${fileBaseUrl}/${filepath || filename}`;
|
||||
link.target = "_blank";
|
||||
link.textContent = filename;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user