Add SEO info

This commit is contained in:
2025-09-15 16:08:53 +02:00
parent 1ff48b0ece
commit 280dfee53b
3 changed files with 39 additions and 3 deletions
+1 -1
View File
@@ -48,7 +48,7 @@
- [x] Pretty slugified urls
- [x] All static texts translated
- [ ] Pretty
- [ ] SEO, Meta, Preview
- [x] SEO, Meta, Preview
- [ ] Deployment `.on.hs-bremen.de`??
```txt
@@ -40,7 +40,25 @@ useHead({
]
.filter((s) => s && s?.length > 0)
.join(' | ') || t('layouts.default_tile')
})
}),
meta: [
{
property: 'og:title',
content: hasKey(data.value, 'title')
? tKey(data.value!, 'title').value
: questSlug?.name
},
{
property: 'og:description',
content: hasKey(data.value, 'description')
? tKey(data.value!, 'description').value
: questSlug?.name
},
{
property: 'og:image',
content: data.value?.picture?.url
}
]
});
const answer = ref(data.value?.answer?.text);
+19 -1
View File
@@ -20,7 +20,25 @@ const hideAnswers = ref(true);
useHead({
title: t('layouts.title', {
title: hasKey(data.value, 'name') ? tKey(data.value!, 'name').value : name
})
}),
meta: [
{
property: 'og:title',
content: hasKey(data.value, 'name')
? tKey(data.value!, 'name').value
: name
},
{
property: 'og:description',
content: hasKey(data.value, 'description')
? tKey(data.value!, 'description').value
: name
},
{
property: 'og:image',
content: data.value?.picture?.url
}
]
});
watch(loggedIn, () => refresh());