From cf72c569ab1f8418f5a7021f3f6abeb2416939e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 16 Oct 2023 15:46:33 +0200 Subject: [PATCH] seo improvements --- app.vue | 19 ++++++++++--------- content/2.modules.yml | 1 - content/3.showcase.yml | 1 - content/4.enterprise/1.support.md | 1 - content/4.enterprise/2.agencies.yml | 1 - content/4.enterprise/3.sponsors.yml | 1 - content/4.enterprise/4.jobs.yml | 2 -- content/4.enterprise/_dir.yml | 2 +- content/5.blog.yml | 6 ++---- content/design-kit.md | 1 - package.json | 1 + pages/blog/[slug].vue | 6 ++++++ pages/blog/index.vue | 6 +++++- pages/docs/[...slug].vue | 4 ++-- pages/enterprise/agencies/[slug].vue | 6 ++++++ pages/enterprise/agencies/index.vue | 6 +++++- pages/enterprise/jobs.vue | 6 +++++- pages/enterprise/sponsors.vue | 6 +++++- pages/enterprise/support.vue | 6 +++++- pnpm-lock.yaml | 3 +++ 20 files changed, 56 insertions(+), 29 deletions(-) diff --git a/app.vue b/app.vue index e7c40f206..aedbd9f07 100644 --- a/app.vue +++ b/app.vue @@ -1,8 +1,11 @@ @@ -55,7 +56,7 @@ provide('navigation', navigation) - + diff --git a/content/2.modules.yml b/content/2.modules.yml index a930ae54f..70fb478e3 100644 --- a/content/2.modules.yml +++ b/content/2.modules.yml @@ -1,4 +1,3 @@ title: Modules description: Discover our list of modules to supercharge your Nuxt project. Created by the Nuxt team and community. navigation.icon: i-ph-puzzle-piece-duotone -head.image: '/socials/modules.jpg' diff --git a/content/3.showcase.yml b/content/3.showcase.yml index 86e48c257..06fed7a22 100644 --- a/content/3.showcase.yml +++ b/content/3.showcase.yml @@ -1,7 +1,6 @@ title: Showcase description: Discover our selection of websites built with Nuxt. This collection is powered by VueTelescope. navigation.icon: i-ph-app-window-duotone -head.image: '/socials/showcase.jpg' links: - label: 'Chrome' size: 'md' diff --git a/content/4.enterprise/1.support.md b/content/4.enterprise/1.support.md index dda5272d7..a93b671db 100644 --- a/content/4.enterprise/1.support.md +++ b/content/4.enterprise/1.support.md @@ -2,7 +2,6 @@ title: Official Support navigation.title: Support description: Through NuxtLabs experts and agency networks, we have a solution for every need. -head.image: '/socials/support.jpg' navigation.icon: i-ph-lifebuoy-duotone links: - to: 'mailto:experts@nuxt.com' diff --git a/content/4.enterprise/2.agencies.yml b/content/4.enterprise/2.agencies.yml index 0fb280b56..b85083067 100644 --- a/content/4.enterprise/2.agencies.yml +++ b/content/4.enterprise/2.agencies.yml @@ -2,7 +2,6 @@ title: Nuxt Agencies description: Are you looking for a trusted partner with a strong expertise in Nuxt development? Consult our agency partner catalog and find an agency near you with the right set of skills. head.title: Nuxt Partner Agencies head.description: Consult our agency partner catalog and find an agency near you with the right set of skills. -head.image: '/socials/agencies.jpg' navigation.icon: i-ph-handshake-duotone links: - label: 'Submit my agency' diff --git a/content/4.enterprise/3.sponsors.yml b/content/4.enterprise/3.sponsors.yml index e3f37263e..38fc7d23a 100644 --- a/content/4.enterprise/3.sponsors.yml +++ b/content/4.enterprise/3.sponsors.yml @@ -1,7 +1,6 @@ title: Sponsors description: Nuxt is an open-source framework totally free to use thanks to our generous sponsors. If you use Nuxt in your daily work and feel that it has made your life easier, please consider backing us. head.description: Nuxt is an open-source framework totally free to use thanks to our generous sponsors. -head.image: '/socials/sponsors.jpg' navigation.icon: i-ph-hand-heart-duotone links: - label: 'Become a sponsor' diff --git a/content/4.enterprise/4.jobs.yml b/content/4.enterprise/4.jobs.yml index 41462a946..f3c811262 100644 --- a/content/4.enterprise/4.jobs.yml +++ b/content/4.enterprise/4.jobs.yml @@ -1,9 +1,7 @@ title: Explore Nuxt Jobs description: Browse available openings for coding with Vue and Nuxt all over the world. -head.title: Jobs navigation.title: Jobs navigation.icon: i-ph-briefcase-duotone -head.image: '/socials/jobs.jpg' links: - label: 'Post a job' to: 'https://vuejobs.com/jobs/create' diff --git a/content/4.enterprise/_dir.yml b/content/4.enterprise/_dir.yml index 4ee0d72f7..76a7041ab 100644 --- a/content/4.enterprise/_dir.yml +++ b/content/4.enterprise/_dir.yml @@ -1,2 +1,2 @@ navigation.icon: i-ph-buildings-duotone -head.titleTemplate: '%s - Nuxt Enterprise' +head.titleTemplate: '%s · Nuxt Enterprise' diff --git a/content/5.blog.yml b/content/5.blog.yml index 65267e8fe..d5f778718 100644 --- a/content/5.blog.yml +++ b/content/5.blog.yml @@ -1,6 +1,4 @@ -title: Blog +title: The Nuxt Blog +navigation.title: Blog description: 'Read the latest news about all Nuxt solutions, from framework announcements to integration tutorials.' navigation.icon: i-ph-newspaper -head.title: The Nuxt Blog -head.description: Read the latest news about the Nuxt framework and its community. -head.image: '/socials/blog.jpg' diff --git a/content/design-kit.md b/content/design-kit.md index bd5ccb8d6..bb59636c1 100644 --- a/content/design-kit.md +++ b/content/design-kit.md @@ -1,7 +1,6 @@ --- title: Design Kit description: Welcome to Nuxt design definition page. Identity was redefined by handpicking conscientiously colors, typography and shapes in order to put forward how performant, useful & easy Nuxt products are. -head.image: '/socials/design-kit.jpg' navigation.icon: 'i-ph-palette' links: - label: 'Download Design Kit' diff --git a/package.json b/package.json index c7c62abf9..86d849093 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "@vueuse/core": "^10.5.0", "@vueuse/nuxt": "^10.5.0", "nuxt": "^3.7.4", + "perfect-debounce": "^1.0.0", "scule": "^1.0.0", "sitemap": "^7.1.1" }, diff --git a/pages/blog/[slug].vue b/pages/blog/[slug].vue index 63b55ef35..b5dc9c2cf 100644 --- a/pages/blog/[slug].vue +++ b/pages/blog/[slug].vue @@ -18,6 +18,12 @@ const { data: surround } = await useAsyncData(`${route.path}-surround`, () => qu .findSurround(withoutTrailingSlash(route.path)) ) +useSeoMeta({ + titleTemplate: '%s · Nuxt Blog', + title: article.value.head?.title || article.value.title, + description: article.value.head?.description || article.value.description +}) + const socialLinks = computed(() => [{ icon: 'i-simple-icons-linkedin', to: `https://www.linkedin.com/sharing/share-offsite/?url=https://nuxt.com${article.value._path}` diff --git a/pages/blog/index.vue b/pages/blog/index.vue index ec47e7874..1669871e8 100644 --- a/pages/blog/index.vue +++ b/pages/blog/index.vue @@ -4,7 +4,11 @@ const { fetchList, articles } = useBlog() const { data: page } = await useAsyncData(route.path, () => queryContent(route.path).findOne()) -useContentHead(page) +useSeoMeta({ + titleTemplate: '%s', + title: page.value.head?.title || page.value.title, + description: page.value.head?.description || page.value.description +}) await fetchList() diff --git a/pages/docs/[...slug].vue b/pages/docs/[...slug].vue index 0648091ce..7a50c815b 100644 --- a/pages/docs/[...slug].vue +++ b/pages/docs/[...slug].vue @@ -37,7 +37,7 @@ const titleTemplate = computed(() => { if (page.value.titleTemplate) return page.value.titleTemplate const titleTemplate = navKeyFromPath(route.path, 'titleTemplate', navigation.value) if (titleTemplate) return titleTemplate - return '%s - Nuxt' + return '%s · Nuxt' }) const communityLinks = computed(() => [{ @@ -84,7 +84,7 @@ const ecosystemLinks = [{ useSeoMeta({ titleTemplate, title: page.value.head?.title || page.value.title, - description: page.value.description + description: page.value.head?.description || page.value.description }) diff --git a/pages/enterprise/agencies/[slug].vue b/pages/enterprise/agencies/[slug].vue index 353173dfd..a18ae65c6 100644 --- a/pages/enterprise/agencies/[slug].vue +++ b/pages/enterprise/agencies/[slug].vue @@ -17,6 +17,12 @@ const links = computed(() => [{ to: agency.value.link, target: '_blank' }]) + +useSeoMeta({ + titleTemplate: '%s · Nuxt Agencies', + title: agency.value.head?.title || agency.value.title, + description: agency.value.head?.description || agency.value.description +})