Update generate-index.mjs
This commit is contained in:
parent
0b4e090530
commit
f5b3d20beb
1 changed files with 1 additions and 2 deletions
|
|
@ -75,7 +75,6 @@ async function collectFiles(relBase = "", flat = []) {
|
||||||
title = parseTitle(raw, ext) || e.name.replace(new RegExp(`\\${ext}$`), "").trim();
|
title = parseTitle(raw, ext) || e.name.replace(new RegExp(`\\${ext}$`), "").trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Priority: birthtime → mtime → filename
|
|
||||||
const ctime = st.birthtimeMs || st.mtimeMs || dateFromName(e.name) || st.mtimeMs;
|
const ctime = st.birthtimeMs || st.mtimeMs || dateFromName(e.name) || st.mtimeMs;
|
||||||
const mtime = dateFromName(e.name) ?? st.mtimeMs;
|
const mtime = dateFromName(e.name) ?? st.mtimeMs;
|
||||||
|
|
||||||
|
|
@ -91,7 +90,7 @@ async function collectFiles(relBase = "", flat = []) {
|
||||||
mtime,
|
mtime,
|
||||||
excerpt: extractExcerpt(raw, ext),
|
excerpt: extractExcerpt(raw, ext),
|
||||||
tags: extractTags(raw, ext, pdfData),
|
tags: extractTags(raw, ext, pdfData),
|
||||||
isIndex: baseName.startsWith("index."), // index.md, index.html, index.pdf
|
isIndex: baseName.startsWith("index."),
|
||||||
isPinned: baseName.startsWith("pinned.")
|
isPinned: baseName.startsWith("pinned.")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue