mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
feat: ✨ Add more SEO metadata to all pages
This commit is contained in:
parent
5a6a7d4fdd
commit
a19339bd33
|
|
@ -11,6 +11,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useTitle } from "@vueuse/core";
|
||||||
import { Loader } from "lucide-vue-next";
|
import { Loader } from "lucide-vue-next";
|
||||||
import Note from "~/components/notes/note.vue";
|
import Note from "~/components/notes/note.vue";
|
||||||
|
|
||||||
|
|
@ -54,10 +55,14 @@ watch(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
useServerSeoMeta({
|
useSeoMeta({
|
||||||
title: note.value?.account.display_name,
|
title: computed(() =>
|
||||||
description: note.value?.content,
|
note.value ? note.value.account.display_name : "Loading",
|
||||||
ogImage: note.value?.media_attachments[0]?.preview_url,
|
),
|
||||||
|
description: computed(() => (note.value ? note.value.content : undefined)),
|
||||||
|
ogImage: computed(() =>
|
||||||
|
note.value ? note.value.media_attachments[0]?.preview_url : undefined,
|
||||||
|
),
|
||||||
robots: computed(() => ({
|
robots: computed(() => ({
|
||||||
noindex: !!note.value?.account.noindex,
|
noindex: !!note.value?.account.noindex,
|
||||||
nofollow: !!note.value?.account.noindex,
|
nofollow: !!note.value?.account.noindex,
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ definePageMeta({
|
||||||
const { account, isLoading } = useAccountFromAcct(client, username);
|
const { account, isLoading } = useAccountFromAcct(client, username);
|
||||||
const accountId = computed(() => account.value?.id ?? undefined);
|
const accountId = computed(() => account.value?.id ?? undefined);
|
||||||
|
|
||||||
useServerSeoMeta({
|
useSeoMeta({
|
||||||
title: computed(() =>
|
title: computed(() =>
|
||||||
account.value ? account.value.display_name : "Loading",
|
account.value ? account.value.display_name : "Loading",
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@
|
||||||
import Global from "~/components/timelines/global.vue";
|
import Global from "~/components/timelines/global.vue";
|
||||||
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Global",
|
||||||
|
});
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "app",
|
layout: "app",
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@
|
||||||
import Home from "~/components/timelines/home.vue";
|
import Home from "~/components/timelines/home.vue";
|
||||||
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Home",
|
||||||
|
});
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "app",
|
layout: "app",
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ import Home from "~/components/timelines/home.vue";
|
||||||
import Public from "~/components/timelines/public.vue";
|
import Public from "~/components/timelines/public.vue";
|
||||||
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: identity.value ? "Home" : "Public",
|
||||||
|
});
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "app",
|
layout: "app",
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,10 @@
|
||||||
import Local from "~/components/timelines/local.vue";
|
import Local from "~/components/timelines/local.vue";
|
||||||
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Local",
|
||||||
|
});
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "app",
|
layout: "app",
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,10 @@
|
||||||
import Notifications from "~/components/timelines/notifications.vue";
|
import Notifications from "~/components/timelines/notifications.vue";
|
||||||
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Notifications",
|
||||||
|
});
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "app",
|
layout: "app",
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@ import { Alert, AlertDescription, AlertTitle } from "~/components/ui/alert";
|
||||||
import { Button } from "~/components/ui/button";
|
import { Button } from "~/components/ui/button";
|
||||||
import { NuxtLink } from "#components";
|
import { NuxtLink } from "#components";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Sign In",
|
||||||
|
});
|
||||||
|
|
||||||
const host = new URL(useBaseUrl().value).host;
|
const host = new URL(useBaseUrl().value).host;
|
||||||
const instance = useInstanceFromClient(new Client(new URL(useBaseUrl().value)));
|
const instance = useInstanceFromClient(new Client(new URL(useBaseUrl().value)));
|
||||||
const { error, error_description } = useUrlSearchParams();
|
const { error, error_description } = useUrlSearchParams();
|
||||||
|
|
|
||||||
|
|
@ -24,5 +24,9 @@ import {
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from "~/components/ui/card";
|
} from "~/components/ui/card";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Authorization Code",
|
||||||
|
});
|
||||||
|
|
||||||
const { code } = useUrlSearchParams();
|
const { code } = useUrlSearchParams();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,10 @@ import { Button } from "~/components/ui/button";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "~/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "~/components/ui/card";
|
||||||
import { NuxtLink } from "#components";
|
import { NuxtLink } from "#components";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Authorization",
|
||||||
|
});
|
||||||
|
|
||||||
const url = useRequestURL();
|
const url = useRequestURL();
|
||||||
const params = useUrlSearchParams();
|
const params = useUrlSearchParams();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,10 @@ import {
|
||||||
import { Input } from "~/components/ui/input";
|
import { Input } from "~/components/ui/input";
|
||||||
import { NuxtLink } from "#components";
|
import { NuxtLink } from "#components";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Reset Password",
|
||||||
|
});
|
||||||
|
|
||||||
identity.value = null;
|
identity.value = null;
|
||||||
|
|
||||||
const formSchema = toTypedSchema(
|
const formSchema = toTypedSchema(
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,10 @@ import {
|
||||||
SettingType,
|
SettingType,
|
||||||
} from "~/settings.ts";
|
} from "~/settings.ts";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Preferences",
|
||||||
|
});
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "app",
|
layout: "app",
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,10 @@ import { Search } from "lucide-vue-next";
|
||||||
import Category from "~/components/preferences/emojis/category.vue";
|
import Category from "~/components/preferences/emojis/category.vue";
|
||||||
import { Input } from "~/components/ui/input";
|
import { Input } from "~/components/ui/input";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Emoji Preferences",
|
||||||
|
});
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "app",
|
layout: "app",
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@
|
||||||
import Public from "~/components/timelines/public.vue";
|
import Public from "~/components/timelines/public.vue";
|
||||||
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: "Public",
|
||||||
|
});
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "app",
|
layout: "app",
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue