feat(SEO): better metadata and SEO tags

This commit is contained in:
2026-02-05 11:39:08 +01:00
parent e202376998
commit 4fa8fce9b2
11 changed files with 22 additions and 1 deletions

View File

@@ -13,11 +13,27 @@ import * as locales from '@nuxt/ui/locale';
const { locale } = useI18n();
const lang = computed(() => locales[locale.value].code);
const dir = computed(() => locales[locale.value].dir);
const { urlBase, fediverseCreator } = useRuntimeConfig().public;
const route = useRoute();
const url = computed(() => urlBase.replace(/\/+$/, '') + route.fullPath);
useHead({
htmlAttrs: {
dir,
lang,
},
link: [
{ rel: 'icon', type: 'image/png', sizes: '32x32', href: '/favicon-32x32.png' },
{ rel: 'icon', type: 'image/png', sizes: '16x16', href: '/favicon-16x16.png' },
{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' },
{ rel: 'manifest', href: '/site.webmanifest' },
],
meta: fediverseCreator !== '' ? [{ name: 'fediverse:creator', content: fediverseCreator + '' }] : [],
});
useSeoMeta({
ogImage: '/leon.png',
twitterImage: '/leon.png',
ogUrl: url,
});
</script>