Metadata and title not displaying
Answered
πππππ£πππ posted this in #help-forum
using next.js latest.
title was working using
title was working using
Helmet, but nothing is working with Head6 Replies
@πππππ£πππ using next.js latest.
title was working using `Helmet`, but nothing is working with `Head`
the way how metadata is defined has changed from pages router to app router. I guess you are using the app router right now, so you need to use the app router syntax:
https://nextjs.org/docs/app/building-your-application/optimizing/metadata
TL;DR:
Do this:
https://nextjs.org/docs/app/building-your-application/optimizing/metadata
TL;DR:
Do this:
import type { Metadata } from 'next'
export const metadata: Metadata = {
title: '...',
description: '...',
}
export default function Page() {}i tried exporting, but it isnt working
Answer
thx, that worked!