this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿง‘๐Ÿ’ป Set digest on YAML loader entries

Signed-off-by: Gwenn Le Bihan <gwenn.lebihan7@gmail.com>

+3 -1
+3 -1
src/content.config.ts
··· 230 230 schema, 231 231 loader: { 232 232 name: "YAML Loader", 233 - async load({ renderMarkdown, store }) { 233 + async load({ renderMarkdown, store, generateDigest }) { 234 234 const raw = await readFile(filename); 235 235 const parsed: Array<z.infer<Schema>> | Record<string, z.infer<Schema>> = 236 236 YAML.parse(raw.toString()); ··· 269 269 store.set({ 270 270 id: entry.slug ?? slug(entry.title), 271 271 data: entry, 272 + digest: generateDigest(JSON.stringify(entry)), 272 273 rendered: await renderMarkdown( 273 274 "description" in entry 274 275 ? typeof entry.description === "string" ··· 284 285 store.set({ 285 286 id: key, 286 287 data: data as z.infer<Schema>, 288 + digest: generateDigest(JSON.stringify(data)), 287 289 rendered: await renderMarkdown( 288 290 "description" in data 289 291 ? typeof data.description === "string"