mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
feat: ✨ Add more SEO metadata to all pages
This commit is contained in:
parent
5a6a7d4fdd
commit
a19339bd33
14 changed files with 58 additions and 5 deletions
|
|
@ -11,6 +11,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useTitle } from "@vueuse/core";
|
||||
import { Loader } from "lucide-vue-next";
|
||||
import Note from "~/components/notes/note.vue";
|
||||
|
||||
|
|
@ -54,10 +55,14 @@ watch(
|
|||
},
|
||||
);
|
||||
|
||||
useServerSeoMeta({
|
||||
title: note.value?.account.display_name,
|
||||
description: note.value?.content,
|
||||
ogImage: note.value?.media_attachments[0]?.preview_url,
|
||||
useSeoMeta({
|
||||
title: computed(() =>
|
||||
note.value ? note.value.account.display_name : "Loading",
|
||||
),
|
||||
description: computed(() => (note.value ? note.value.content : undefined)),
|
||||
ogImage: computed(() =>
|
||||
note.value ? note.value.media_attachments[0]?.preview_url : undefined,
|
||||
),
|
||||
robots: computed(() => ({
|
||||
noindex: !!note.value?.account.noindex,
|
||||
nofollow: !!note.value?.account.noindex,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ definePageMeta({
|
|||
const { account, isLoading } = useAccountFromAcct(client, username);
|
||||
const accountId = computed(() => account.value?.id ?? undefined);
|
||||
|
||||
useServerSeoMeta({
|
||||
useSeoMeta({
|
||||
title: computed(() =>
|
||||
account.value ? account.value.display_name : "Loading",
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue