mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-19 10:54:06 -06:00
Basic ordering (#69)
This commit is contained in:
parent
95caf4cfc6
commit
cdf9d2bbbc
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Release Notes 03.14.24
|
||||
date: 03.14.23
|
||||
date: 03.14.24
|
||||
tags:
|
||||
- releases
|
||||
- demos
|
||||
@ -47,4 +47,4 @@ CHANGED
|
||||
- API Server now uses async methods to make use of benefits of FastAPI
|
||||
|
||||
FIXED
|
||||
- URL encoding all GET requests in honcho client
|
||||
- URL encoding all GET requests in honcho client
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Release Notes 03.21.24
|
||||
date: 03.14.23
|
||||
date: 03.21.24
|
||||
tags:
|
||||
- releases
|
||||
- announcements
|
||||
@ -39,4 +39,4 @@ CHANGED
|
||||
FIXED
|
||||
- API Response schema removed unnecessary fields
|
||||
- OTEL logging to properly work with async database engine
|
||||
- `fly.toml` default settings
|
||||
- `fly.toml` default settings
|
||||
|
||||
@ -28,7 +28,39 @@ export const defaultContentPageLayout: PageLayout = {
|
||||
Component.MobileOnly(Component.Spacer()),
|
||||
Component.Search(),
|
||||
Component.Darkmode(),
|
||||
Component.DesktopOnly(Component.Explorer()),
|
||||
Component.DesktopOnly(Component.Explorer({
|
||||
sortFn: (a, b) => {
|
||||
if (a.file && b.file) {
|
||||
const aDate = new Date(a.file.frontmatter.date)
|
||||
const bDate = new Date(b.file.frontmatter.date)
|
||||
// console.log(a.file)
|
||||
if (a.file.slug.includes("release")) {
|
||||
console.log(a.file.frontmatter.title, a.file.frontmatter.date, aDate)
|
||||
console.log(b.file.frontmatter.title, b.file.frontmatter.date, bDate)
|
||||
console.log(aDate < bDate)
|
||||
}
|
||||
// console.log(a.file.frontmatter.title, aDate)
|
||||
// console.log(b.file.frontmatter.title, bDate)
|
||||
if (aDate < bDate) {
|
||||
return 1
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
else if ((!a.file && !b.file)) {
|
||||
return a.displayName.localeCompare(b.displayName, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
})
|
||||
// console.log(a.file)
|
||||
}
|
||||
if (a.file && !b.file) {
|
||||
return 1
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
})),
|
||||
],
|
||||
right: [
|
||||
Component.Graph(),
|
||||
@ -46,7 +78,33 @@ export const defaultListPageLayout: PageLayout = {
|
||||
Component.MobileOnly(Component.Spacer()),
|
||||
Component.Search(),
|
||||
Component.Darkmode(),
|
||||
Component.DesktopOnly(Component.Explorer()),
|
||||
Component.DesktopOnly(Component.Explorer({
|
||||
sortFn: (a, b) => {
|
||||
if (a.file && b.file) {
|
||||
const aDate = new Date(a.file.frontmatter.date)
|
||||
const bDate = new Date(b.file.frontmatter.date)
|
||||
// console.log(a.file.frontmatter.title, aDate)
|
||||
// console.log(b.file.frontmatter.title, bDate)
|
||||
if (aDate < bDate) {
|
||||
return 1
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
else if ((!a.file && !b.file)) {
|
||||
return a.displayName.localeCompare(b.displayName, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: "base",
|
||||
})
|
||||
// console.log(a.file)
|
||||
}
|
||||
if (a.file && !b.file) {
|
||||
return 1
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
})),
|
||||
],
|
||||
right: [],
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user