Skip to content

Commit

Permalink
vault backup: 2025-01-05 17:05:04
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanamiiiii committed Jan 5, 2025
1 parent cb56c15 commit 1985507
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion quartz.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ogpImageStructure: SocialImageOptions["imageStructure"] = (
const fontBreakPoint = 22
const descFontBreakPoint = 32
const titleSize = title.length > fontBreakPoint ? 50 : 72
const descSize = description.length > descFontBreakPoint ? 32 : 44;
const descSize = description.length > descFontBreakPoint ? 32 : 44

// Setup to access image
const iconPath = `https://${cfg.baseUrl}/static/icon.png`
Expand Down
17 changes: 17 additions & 0 deletions quartz.layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,23 @@ export const defaultContentPageLayout: PageLayout = {
Component.Darkmode(),
Component.DesktopOnly(
Component.Explorer({
sortFn: (a, b) => {
if ((!a.file && !b.file) || (a.file && b.file)) {
if (a.file?.dates?.created && b.file?.dates?.created) {
return a.file.dates.created < b.file.dates.created ? 1 : -1
}
if (a.file?.dates?.created && !b.file?.dates?.created) {
return 1
} else {
return -1
}
}
if (a.file && !b.file) {
return 1
} else {
return -1
}
},
filterFn: (node) => {
if (node.file) {
return node.name !== "tags" && node.file?.frontmatter?.invisible !== true
Expand Down

0 comments on commit 1985507

Please sign in to comment.