new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Nuxt · API · all subjects

composables/use-seo-meta

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

useSeoMeta composable signature and usage

useSeoMeta is a composable that lets you define SEO meta tags as a flat object with full TypeScript support. It accepts an object with over 100 typed meta tag parameters. It is XSS safe and is the recommended way to add meta tags to a Nuxt site. The composable supports over 100 meta tags that are fully typed.

useSeoMeta example with basic meta tags

Example usage of useSeoMeta in app/app.vue: useSeoMeta({ title: 'My Amazing Site', ogTitle: 'My Amazing Site', description: 'This is my amazing site, let me tell you all about it.', ogDescription: 'This is my amazing site, let me tell you all about it.', ogImage: 'https://example.com/image.png', twitterCard: 'summary_large_image', })

useSeoMeta reactive values with computed getter syntax

When inserting tags that are reactive in useSeoMeta, use the computed getter syntax with arrow functions returning the value. Example: const title = ref('My title'); useSeoMeta({ title, description: () => `This is a description for the ${title.value} page`, })

useSeoMeta performance optimization with server-only condition

For better performance with static meta tags that don't need reactivity, wrap useSeoMeta calls in an import.meta.server condition. This ensures meta tags are only added during server-side rendering. Example: if (import.meta.server) { useSeoMeta({ robots: 'index, follow', description: 'Static description that does not need reactivity', ogImage: 'https://example.com/image.png', }) }

useServerSeoMeta composable deprecated

The useServerSeoMeta composable has been deprecated in favor of using useSeoMeta with an import.meta.server condition for server-only meta tags.

Give your agent this brain