From 1b53e5eda06180eec8d89fdd4fed253446581eb4 Mon Sep 17 00:00:00 2001 From: Jaseemuddin Naseem <110375211+jaseemuddinn@users.noreply.github.com> Date: Thu, 17 Oct 2024 20:07:22 +0530 Subject: [PATCH] Add SEO-related meta tags Fixes #49 --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/fossi-foundation/fossi-foundation-web/issues/49?shareId=XXXX-XXXX-XXXX-XXXX). --- components/content/FfPeopleList.vue | 16 ++++++++++++++++ nuxt.config.ts | 12 ++++++++++++ 2 files changed, 28 insertions(+) diff --git a/components/content/FfPeopleList.vue b/components/content/FfPeopleList.vue index 1d85f0f..197d692 100644 --- a/components/content/FfPeopleList.vue +++ b/components/content/FfPeopleList.vue @@ -27,4 +27,20 @@ const data = await queryContent('/about-us/people/_people') //const people = data.people.sort((a, b) => a.name > b.name); const people = data.people + +// Add SEO-related meta tags +useHead({ + title: 'People - FOSSi Foundation', + meta: [ + { name: 'description', content: 'Meet the people behind the FOSSi Foundation.' }, + { property: 'og:title', content: 'People - FOSSi Foundation' }, + { property: 'og:description', content: 'Meet the people behind the FOSSi Foundation.' }, + { property: 'og:image', content: 'https://fossi-foundation.org/images/people.jpg' }, + { property: 'og:url', content: 'https://fossi-foundation.org/about-us/people' }, + { name: 'twitter:card', content: 'summary_large_image' }, + { name: 'twitter:title', content: 'People - FOSSi Foundation' }, + { name: 'twitter:description', content: 'Meet the people behind the FOSSi Foundation.' }, + { name: 'twitter:image', content: 'https://fossi-foundation.org/images/people.jpg' } + ] +}) diff --git a/nuxt.config.ts b/nuxt.config.ts index 7e23c9b..33d6f77 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -84,6 +84,18 @@ export default defineNuxtConfig({ 'python', ] }, + // Pec85: Automatically take the first picture for SEO-related meta tags + seo: { + image: { + path: 'images', + first: true + } + }, + // Ped20: Make URLs absolute automatically + url: { + base: 'https://fossi-foundation.org', + relative: false + } }, // Nuxt Content Assets configuration.