@@ -11,6 +11,7 @@ const directories = {
11 docs: join(process.cwd(), "content/docs"),
11 docs: join(process.cwd(), "content/docs"),
12 grants: join(process.cwd(), "content/grants"),
12 grants: join(process.cwd(), "content/grants"),
13 media: join(process.cwd(), "content/media"),
13 media: join(process.cwd(), "content/media"),
14+ "/": join(process.cwd(), "content"),
16export function getPostSlugs(key) {
17export function getPostSlugs(key) {
@@ -49,7 +50,7 @@ export function getPostBySlug(slug, fields = [], key) {
51 // NB Gavin: This could be removed if the TOML engine returned a JSON date (string) instead of a JS Date object. The YAML engine did this parsing by default.
52 // NB Gavin: This could be removed if the TOML engine returned a JSON date (string) instead of a JS Date object. The YAML engine did this parsing by default.
52− items.date = JSON.stringify(items.date).replace(/\"/g, "");
53+ items.date = JSON.stringify(items?.date)?.replace(/\"/g, "") || "";
54 return items;
55 return items;