Sara
Sara3w ago

How to handle metadata fetching in nextjs(14.2.14) + Convex

If for instance I want to have the some of the user's information as metadata, How do I go by doing this with convex? cause it works just in development for me.
5 Replies
Convex Bot
Convex Bot3w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
Sara
SaraOP3w ago
small update to my message: it's working fine with my approach, but it discord it shows something else.. I'm also still interested to see how other's approach this.
ballingt
ballingt3w ago
What does metadata mean here, the meta HTML tag? open graph etc.? https://ogp.me/
Sara
SaraOP3w ago
Yep, I'm specifically talking about opengragh rn since it's not reloading, I'm currently fetching the information and using this one https://nextjs.org/docs/app/api-reference/functions/generate-metadata With an http request, it's working in the browser, but discord seems to take the first layout data it gets? Like for instance if your title is "Sara" in Root layout, and you're using that function to generate data with async request and change the title, the title stays put
Functions: generateMetadata | Next.js
Learn how to add Metadata to your Next.js application for improved search engine optimization (SEO) and web shareability.
ballingt
ballingt3w ago
got it, so you'd have to block the root layout on loading that data