feat!: front-matter `language` -> `lang`
This commit is contained in:
parent
1399bd9bc7
commit
31af084f8a
|
@ -44,7 +44,7 @@ image: ''
|
|||
tags: []
|
||||
category: ''
|
||||
draft: false
|
||||
language: ''
|
||||
lang: ''
|
||||
---
|
||||
`
|
||||
|
||||
|
|
|
@ -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(''),
|
||||
|
|
|
@ -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
|
||||
}
|
||||
---
|
||||
<MainGridLayout banner={entry.data.image} title={entry.data.title} description={entry.data.description} lang={entry.data.language}>
|
||||
<MainGridLayout banner={entry.data.image} title={entry.data.title} description={entry.data.description} lang={entry.data.lang}>
|
||||
<script is:inline slot="head" type="application/ld+json" set:html={JSON.stringify(jsonLd)}></script>
|
||||
<div class="flex w-full rounded-[var(--radius-large)] overflow-hidden relative mb-4">
|
||||
<div id="post-container" class:list={["card-base z-10 px-6 md:px-9 pt-6 pb-4 relative w-full ",
|
||||
|
|
Loading…
Reference in New Issue