build site with bun (#32)
This commit is contained in:
parent
3a886c4493
commit
bf087a566f
12 changed files with 100 additions and 9447 deletions
|
@ -1,45 +1,49 @@
|
|||
import { defineCollection, z } from "astro:content";
|
||||
import { rssSchema } from '@astrojs/rss';
|
||||
import { rssSchema } from "@astrojs/rss";
|
||||
|
||||
const posts = defineCollection({
|
||||
type: "content",
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
date: z.coerce.date(),
|
||||
updated: z.date().optional(),
|
||||
draft: z.boolean().optional(),
|
||||
image: z.object({
|
||||
url: image(),
|
||||
alt: z.string(),
|
||||
}),
|
||||
tags: z.array(z.string()),
|
||||
extraAuthors: z.array(z.string()).optional(),
|
||||
categories: z.array(z.string()),
|
||||
}).merge(rssSchema)
|
||||
z
|
||||
.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
date: z.coerce.date(),
|
||||
updated: z.date().optional(),
|
||||
draft: z.boolean().optional(),
|
||||
image: z.object({
|
||||
url: image(),
|
||||
alt: z.string(),
|
||||
}),
|
||||
tags: z.array(z.string()),
|
||||
extraAuthors: z.array(z.string()).optional(),
|
||||
categories: z.array(z.string()),
|
||||
})
|
||||
.merge(rssSchema),
|
||||
});
|
||||
|
||||
const projects = defineCollection({
|
||||
type: "content",
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
date: z.coerce.date(),
|
||||
updated: z.date().optional(),
|
||||
draft: z.boolean().optional(),
|
||||
image: z.object({
|
||||
url: image(),
|
||||
alt: z.string(),
|
||||
}),
|
||||
tags: z.array(z.string()),
|
||||
extraAuthors: z.array(z.string()).optional(),
|
||||
categories: z.array(z.string()),
|
||||
featured: z.boolean().optional(),
|
||||
collection: z.boolean().optional(),
|
||||
includeHero: z.boolean().optional(),
|
||||
}).merge(rssSchema)
|
||||
z
|
||||
.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
date: z.coerce.date(),
|
||||
updated: z.date().optional(),
|
||||
draft: z.boolean().optional(),
|
||||
image: z.object({
|
||||
url: image(),
|
||||
alt: z.string(),
|
||||
}),
|
||||
tags: z.array(z.string()),
|
||||
extraAuthors: z.array(z.string()).optional(),
|
||||
categories: z.array(z.string()),
|
||||
featured: z.boolean().optional(),
|
||||
collection: z.boolean().optional(),
|
||||
includeHero: z.boolean().optional(),
|
||||
})
|
||||
.merge(rssSchema),
|
||||
});
|
||||
|
||||
const work = defineCollection({
|
||||
|
|
|
@ -24,9 +24,9 @@ On NixOS you can install Packard by including it as an input in flake.nix, then
|
|||
inputs = {
|
||||
packard.url = "github:troylusty/packard";
|
||||
};
|
||||
```
|
||||
|
||||
```nix
|
||||
...
|
||||
|
||||
environment.systemPackages = {
|
||||
inputs.packard.packages."${pkgs.system}".default
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue