Update generate-index.mjs

This commit is contained in:
Mark Randall Havens △ The Empathic Technologist ⟁ Doctor Who 42 2025-11-08 19:22:15 -06:00 committed by GitHub
parent 0b4e090530
commit f5b3d20beb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -75,7 +75,6 @@ async function collectFiles(relBase = "", flat = []) {
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 mtime = dateFromName(e.name) ?? st.mtimeMs;
@ -91,7 +90,7 @@ async function collectFiles(relBase = "", flat = []) {
mtime,
excerpt: extractExcerpt(raw, ext),
tags: extractTags(raw, ext, pdfData),
isIndex: baseName.startsWith("index."), // index.md, index.html, index.pdf
isIndex: baseName.startsWith("index."),
isPinned: baseName.startsWith("pinned.")
});
}