chore: typecheck and build clean
This commit is contained in:
parent
7f02600c05
commit
82861ca4d2
2 changed files with 7 additions and 4 deletions
|
|
@ -9,7 +9,9 @@
|
|||
"Bash(export PATH=\"$HOME/.nvm/versions/node/v22.22.2/bin:$HOME/.local/share/pnpm:$PATH\")",
|
||||
"Bash(pnpm install *)",
|
||||
"Bash(node scripts/migrate.js)",
|
||||
"Bash(node scripts/seed.js)"
|
||||
"Bash(node scripts/seed.js)",
|
||||
"Bash(pnpm typecheck *)",
|
||||
"Bash(pnpm build *)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
import type { APIRoute } from 'astro';
|
||||
import { getCollection } from 'astro:content';
|
||||
import { getCollection, type CollectionEntry } from 'astro:content';
|
||||
|
||||
export const GET: APIRoute = async ({ site }) => {
|
||||
const updates = await getCollection('updates');
|
||||
const sorted = updates.sort(
|
||||
(a, b) => new Date(b.data.date).getTime() - new Date(a.data.date).getTime()
|
||||
(a: CollectionEntry<'updates'>, b: CollectionEntry<'updates'>) =>
|
||||
new Date(b.data.date).getTime() - new Date(a.data.date).getTime()
|
||||
);
|
||||
|
||||
const base = 'https://bifrost.fenja.ai';
|
||||
|
||||
const items = sorted.map((u) => {
|
||||
const items = sorted.map((u: CollectionEntry<'updates'>) => {
|
||||
const url = `${base}/updates/${u.slug}`;
|
||||
const date = new Date(u.data.date).toUTCString();
|
||||
return `
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue