From 42f6d73604fb9bdbf9bbf66a443ce20b4701626e Mon Sep 17 00:00:00 2001 From: HugoRCD Date: Tue, 21 Jan 2025 20:13:25 +0100 Subject: [PATCH] use nuxt/seo lts --- apps/lp/content.config.ts | 39 +++++++++++++++++++++------------------ apps/lp/nuxt.config.ts | 21 ++++----------------- apps/lp/public/robots.txt | 2 -- 3 files changed, 25 insertions(+), 37 deletions(-) delete mode 100644 apps/lp/public/robots.txt diff --git a/apps/lp/content.config.ts b/apps/lp/content.config.ts index 387d0b8c..2bb674b4 100644 --- a/apps/lp/content.config.ts +++ b/apps/lp/content.config.ts @@ -1,23 +1,26 @@ import { defineCollection, z } from '@nuxt/content' +import { asSeoCollection } from '@nuxtjs/seo/content' export const collections = { - content: defineCollection({ - type: 'page', - source: '**/*', - schema: z.object({ - navigation: z.object({ - title: z.string().optional(), - }), - links: z.array(z.object({ - label: z.string(), - icon: z.string(), - avatar: z.object({ - src: z.string(), - alt: z.string() - }).optional(), - to: z.string(), - target: z.string().optional() - })) + content: defineCollection( + asSeoCollection({ + type: 'page', + source: '**/*', + schema: z.object({ + navigation: z.object({ + title: z.string().optional(), + }), + links: z.array(z.object({ + label: z.string(), + icon: z.string(), + avatar: z.object({ + src: z.string(), + alt: z.string() + }).optional(), + to: z.string(), + target: z.string().optional() + })) + }) }) - }), + ) } diff --git a/apps/lp/nuxt.config.ts b/apps/lp/nuxt.config.ts index 58060c43..10ea57e1 100644 --- a/apps/lp/nuxt.config.ts +++ b/apps/lp/nuxt.config.ts @@ -10,10 +10,10 @@ export default defineNuxtConfig({ modules: [ '@nuxt/ui-pro', + '@nuxtjs/seo', '@nuxt/content', 'nuxt-og-image', - '@nuxt/scripts', - '@nuxtjs/seo' + '@nuxt/scripts' ], runtimeConfig: { @@ -42,29 +42,16 @@ export default defineNuxtConfig({ }, nitro: { - /*prerender: { + prerender: { crawlLinks: true, autoSubfolderIndex: false - },*/ + }, }, experimental: { viewTransition: true, }, - sitemap: { - enabled: false - }, - robots: { - enabled: false - }, - schemaOrg: { - enabled: false - }, - linkChecker: { - enabled: false - }, - image: { provider: 'ipx' }, diff --git a/apps/lp/public/robots.txt b/apps/lp/public/robots.txt deleted file mode 100644 index c2a49f4f..00000000 --- a/apps/lp/public/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Allow: /