Basic ordering (#69)

This commit is contained in:
Vineeth Voruganti 2024-03-26 12:45:12 -07:00 committed by GitHub
parent 95caf4cfc6
commit cdf9d2bbbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 64 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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: [],
}