@@ -39,8 +39,14 @@ export default {
3939 } ,
4040 head : ( ) => {
4141 const config = useConfig ( ) ;
42- const { title, description, image } = config . frontMatter ;
43- const pageTitle = title ? `${ title } – Loro` : "Loro" ;
42+ // Nextra v3 moves reserved fields like `title`, `description`, `image`
43+ // out of `frontMatter` into top-level config. Fallback to frontMatter for
44+ // older content that still sets them there.
45+ const metaTitle = config . title ?? config . frontMatter ?. title ;
46+ const metaDescription =
47+ config . description ?? config . frontMatter ?. description ?? "Loro" ;
48+ const metaImage = config . image ?? config . frontMatter ?. image ;
49+ const pageTitle = metaTitle ? `${ metaTitle } – Loro` : "Loro" ;
4450 const DEFAULT_IMAGE = "https://i.ibb.co/T1x1bSf/IMG-8191.jpg" ;
4551
4652 return (
@@ -50,19 +56,20 @@ export default {
5056 src = "https://us.umami.is/script.js"
5157 data-website-id = "5a4c9e46-22c9-46ee-82d8-901253485cf1"
5258 />
59+ < title > { pageTitle } </ title >
5360 < meta name = "msapplication-TileColor" content = "#fff" />
5461 < meta name = "theme-color" content = "#fff" />
5562 < meta name = "viewport" content = "width=device-width, initial-scale=1.0" />
5663 < meta httpEquiv = "Content-Language" content = "en" />
57- < meta name = "description" content = { description || "Loro" } />
58- < meta name = "og:description" content = { description || "Loro" } />
64+ < meta name = "description" content = { metaDescription } />
65+ < meta name = "og:description" content = { metaDescription } />
5966 < meta name = "twitter:card" content = "summary_large_image" />
60- < meta name = "twitter:image" content = { image || DEFAULT_IMAGE } />
67+ < meta name = "twitter:image" content = { metaImage || DEFAULT_IMAGE } />
6168 < meta name = "twitter:site:domain" content = "loro.dev" />
6269 < meta name = "twitter:site" content = "@loro_dev" />
6370 < meta name = "twitter:url" content = "https://loro.dev" />
6471 < meta property = "og:title" content = { pageTitle } />
65- < meta property = "og:image" content = { image || DEFAULT_IMAGE } />
72+ < meta property = "og:image" content = { metaImage || DEFAULT_IMAGE } />
6673 < meta name = "apple-mobile-web-app-title" content = "Loro" />
6774 </ >
6875 ) ;
0 commit comments