1234567891011121314151617181920212223242526 |
- // import { useSeoMeta } from '#imports'; // Nuxt 3 提供的 composables
- // const seoSetup = function(title: string, description: string, keywords: string){
- // // 使用 useSeoMeta 设置 SEO 相关的 meta 标签
- // useSeoMeta({
- // title,
- // description,
- // keywords,
- // });
- // };
- // export {seoSetup};
- import { useHead } from '#imports'; // Nuxt 3 提供的 composables
- const seoSetup = (title: string, description: string, keywords: string) => {
- useHead({
- title: title,
- meta: [
- { name: 'description', content: description },
- { name: 'keywords', content: keywords }
- ]
- });
- };
- export {seoSetup};
|