Skip to content

Commit

Permalink
chore: update SEO
Browse files Browse the repository at this point in the history
  • Loading branch information
zAlweNy26 committed Dec 27, 2024
1 parent 24ec171 commit d08d787
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion app/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,29 @@ const name = computed(() => route.name)
const lang = computed(() => locales[locale.value].code)
const dir = computed(() => locales[locale.value].dir)
const seoTitle = computed(() => name.value && name.value !== 'index' ? t(`header.${String(name.value)}`) : '')
useHead({
titleTemplate: t => t ? `${t} - ${title}` : title,
title: () => name.value && name.value !== 'index' ? t(`header.${String(name.value)}`) : '',
title: seoTitle,
htmlAttrs: {
lang,
dir,
},
})
useSeoMeta({
title: seoTitle,
description: () => t('home.subtitle'),
ogTitle: seoTitle,
ogImage: '/maskable-icon-512x512.png',
ogDescription: () => t('home.subtitle'),
twitterTitle: seoTitle,
twitterDescription: () => t('home.subtitle'),
twitterImage: '/maskable-icon-512x512.png',
twitterCard: 'app',
})
const head = useLocaleHead({
dir: true,
seo: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "nuxt-app",
"name": "ambo",
"private": true,
"type": "module",
"scripts": {
Expand Down

0 comments on commit d08d787

Please sign in to comment.