mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-26 22:34:06 -06:00
Update quartz.config.ts
This commit is contained in:
parent
ca5d12dd0c
commit
ab982a0b51
@ -78,7 +78,7 @@ const config: QuartzConfig = {
|
|||||||
emitters: [
|
emitters: [
|
||||||
Plugin.AliasRedirects(),
|
Plugin.AliasRedirects(),
|
||||||
Plugin.ComponentResources(),
|
Plugin.ComponentResources(),
|
||||||
Plugin.ContentPage(),
|
Plugin.ContentPage(),
|
||||||
Plugin.FolderPage(),
|
Plugin.FolderPage(),
|
||||||
Plugin.TagPage(),
|
Plugin.TagPage(),
|
||||||
Plugin.ContentIndex({
|
Plugin.ContentIndex({
|
||||||
@ -92,27 +92,5 @@ const config: QuartzConfig = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.RecentNotes({
|
|
||||||
title: "最近更新",
|
|
||||||
showTags: false,
|
|
||||||
limit: 4,
|
|
||||||
filter: (f) => {
|
|
||||||
if (f.filePath?.endsWith("index.md")) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
},
|
|
||||||
sort: (f1, f2) => {
|
|
||||||
if (f1.dates && f2.dates) {
|
|
||||||
if (Math.abs(f2.dates.modified.getDay() - f1.dates.modified.getDay())<=3) {
|
|
||||||
return f2.dates.created.getTime() - f1.dates.created.getTime()
|
|
||||||
}
|
|
||||||
return f2.dates.modified.getTime() - f1.dates.modified.getTime()
|
|
||||||
} else if (f1.dates && !f2.dates) {
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export default config
|
export default config
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user