diff --git a/package.json b/package.json index 6457a0f..b656300 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "typescript": "^5.6.3" }, "devDependencies": { + "@unocss/preset-uno": "^0.64.1", "unocss": "^0.64.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7e7a7a4..17cf599 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,6 +24,9 @@ importers: specifier: ^5.6.3 version: 5.6.3 devDependencies: + '@unocss/preset-uno': + specifier: ^0.64.1 + version: 0.64.1 unocss: specifier: ^0.64.1 version: 0.64.1(postcss@8.4.49)(rollup@4.27.2)(vite@5.4.11(sass@1.81.0))(vue@3.5.13(typescript@5.6.3)) diff --git a/src/content/config.ts b/src/content/config.ts index 238d31a..6ae6671 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -1,11 +1,29 @@ // 1. Import utilities from `astro:content` -import { defineCollection } from "astro:content"; +import { defineCollection, z } from "astro:content"; // 2. Define your collection(s) -const blogCollection = defineCollection({ - /* ... */ +const journalCollection = defineCollection({ + type: "content", + schema: z.object({ + title: z.string(), + date: z.date(), + tags: z.string().array(), + category: z.string().optional(), + description: z.string().optional(), + }), +}); +const articleCollection = defineCollection({ + type: "content", + schema: z.object({ + title: z.string(), + date: z.date(), + tags: z.string().array(), + category: z.string().optional(), + description: z.string().optional(), + }), }); // 3. Export a single `collections` object to register your collection(s) // This key should match your collection directory name in "src/content" export const collections = { - blog: blogCollection, + "journal-entries": journalCollection, + articles: articleCollection, }; diff --git a/src/content/journal-entries/2024-11-19.md b/src/content/journal-entries/2024-11-19.md index 264ad06..b37760f 100644 --- a/src/content/journal-entries/2024-11-19.md +++ b/src/content/journal-entries/2024-11-19.md @@ -1,6 +1,9 @@ --- title: MySQL JSON Shenanigans date: 2024-11-19 +tags: ["mysql"] +category: "MySQL" +description: "Out of the box, there is a MySQL text encoding mismatch between VARCHAR columns and JSON columns." --- In an effort to support out-of-date installations of our app, I had to keep a JSON column in our database. The column is obsolete, as are the values within it; but these installations continue to use it. So, knowing this, I decided to put the proper values into the column. I didn't want to pollute the code of our services to do so, though. So I made it into a `GENERATED` column. diff --git a/src/content/journal-entries/2024-11-20.md b/src/content/journal-entries/2024-11-20.md index e3481df..a779b4a 100644 --- a/src/content/journal-entries/2024-11-20.md +++ b/src/content/journal-entries/2024-11-20.md @@ -1,6 +1,9 @@ --- title: Elasticsearch Ingestion Daemon date: 2024-11-20 +tags: ["elasticsearch"] +category: "Elasticsearch" +description: "Batch-processing boundaries need to be defined with enough information to point to exactly one record, taking into account records being updated between batches." --- I still saw requests coming in through an old Cloudflare-Worker-based proxy I had set up, before I released the current one, which rewrites `m3u8` files on-the-fly, besides proxying the segment files themselves (among other features). I updated our website and app to use the new proxy; where were these requests coming from? I inspected some requests as they came in using the Cloudflare interface, and I found that the User Agent was always one of our apps; and different versions of it at that. We still had un-updated versions of our app out in the wild, but I also saw requests from the latest version! How could this be? diff --git a/src/content/journal-entries/2024-11-21.md b/src/content/journal-entries/2024-11-21.md index 63a4f0d..5048f70 100644 --- a/src/content/journal-entries/2024-11-21.md +++ b/src/content/journal-entries/2024-11-21.md @@ -1,6 +1,9 @@ --- title: React-Admin Wrestling, a Little More Elasticsearch date: 2024-11-21 +tags: ["react", "react-admin", "elasticsearch"] +category: "React Admin" +description: "(This article is still incomplete. I began writing this entry after work the day it happened, and I didn't get a chance to get back to it until today (12 days later), so I forgot what I was planning on writing about!)" --- React-admin is a wonderful framework, and is quite flexible; but if you need something that it doesn't offer, it's very difficult to dig through the docs to find out how to do it. diff --git a/src/content/journal-entries/2024-11-23.md b/src/content/journal-entries/2024-11-23.md index f70a79d..06d4690 100644 --- a/src/content/journal-entries/2024-11-23.md +++ b/src/content/journal-entries/2024-11-23.md @@ -1,6 +1,9 @@ --- title: "@astrojs/node Build Error" date: 2024-11-23 +tags: ["astro"] +category: "Astro" +description: "Always prefix native imports with `node:`, even in dependencies. If a dependency doesn't do it, adjust your build-step to do it for you." --- Today's entry is about this very site. @@ -62,4 +65,4 @@ export default defineConfig({ }); ``` -The worked famously. +This worked famously. diff --git a/src/content/journal-entries/2024-11-24.md b/src/content/journal-entries/2024-11-24.md index 6344f63..f0c519d 100644 --- a/src/content/journal-entries/2024-11-24.md +++ b/src/content/journal-entries/2024-11-24.md @@ -1,6 +1,9 @@ --- title: "Content Frontmatter Causes `astro build` Error?" date: 2024-11-24 +tags: ["astro"] +category: "Astro" +description: "Keep your eyes peeled for special characters." --- Another entry for this site. I ran `pnpm run build` after adding yesterday's entry, and got this error: @@ -48,3 +51,5 @@ date: 2024-11-23 <... rest of the file...> ``` + +It seems that the `@` character signals an import from another file, and obviously there wasn't any so-named file. diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index cb1a6fa..fd88efd 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -11,7 +11,7 @@ const { title } = Astro.props;
- + @@ -42,35 +42,14 @@ const { title } = Astro.props; frame="fill" position="relative" color="brand" + class:list={["mb-6"]} />