SEO

Setup

1、Set All Defaut Page SEO Meta

in /app.config.ts file the app->overall->seo, Set the default SEO meta for all pages.

app.config.ts
export default defineAppConfig({    app: {        overall: {            seo: {                meta: {                title: 'Make it easier to build small products - fast2build',                ogTitle: 'Make it easier to build small products - fast2build',                description: 'Preset template components, login, payment, email and others, fast development, fast build, fast launch.',                ogDescription: 'Preset template components, login, payment, email and others, fast development, fast build, fast launch.',                ogImage: 'https://example.com/image.png',                twitterCard: 'summary_large_image',                }            }        }    }})

2、Set Some Page SEO Meta

Within your pages/ directory, you can use definePageMeta to set metadata based on the current route.

For example, you can set the current page title:

pages/some-page.vue
<script setup lang="ts">definePageMeta({  title: 'Some Page'})</script>

© Copyright 2024 fast2build