diff --git a/scripts/new-post.js b/scripts/new-post.js index 6f9f21ec8..f66a188c5 100644 --- a/scripts/new-post.js +++ b/scripts/new-post.js @@ -44,7 +44,7 @@ image: '' tags: [] category: '' draft: false -language: '' +lang: '' --- ` diff --git a/src/content/config.ts b/src/content/config.ts index 50e7d8b50..aca0bff79 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -9,7 +9,7 @@ const postsCollection = defineCollection({ image: z.string().optional().default(''), tags: z.array(z.string()).optional().default([]), category: z.string().optional().default(''), - language: z.string().optional().default(''), + lang: z.string().optional().default(''), /* For internal use */ prevTitle: z.string().default(''), diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 5025db603..34815a559 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -41,11 +41,11 @@ const jsonLd = { url: Astro.site, }, datePublished: formatDateToYYYYMMDD(entry.data.published), - inLanguage: (entry.data.language ? entry.data.language.replace('_', '-') : siteConfig.lang.replace('_', '-')), + inLanguage: (entry.data.lang ? entry.data.lang.replace('_', '-') : siteConfig.lang.replace('_', '-')), // TODO include cover image here } --- - +