SEO cleanup (#1367)

* SEO/Metadata cleanup

May split rules changes into its own PR

* Revert rules/terms changes as they are now on a separate branch

* Update [searchProjectType].vue

* Update terms.vue
This commit is contained in:
Emma Alexia Triphora
2023-09-22 12:45:03 -04:00
committed by GitHub
parent bd4da4f365
commit fc64719bb8
29 changed files with 261 additions and 473 deletions

View File

@@ -1,17 +1,5 @@
<template>
<div v-if="user">
<Head>
<Title>{{ user.username + ' - Modrinth' }}</Title>
<Meta name="og:title" :content="user.username" />
<Meta name="description" :content="metaDescription" />
<Meta name="og:type" content="website" />
<Meta name="apple-mobile-web-app-title" :content="metaDescription" />
<Meta name="og:description" :content="metaDescription" />
<Meta
name="og:image"
:content="user.avatar_url ? user.avatar_url : 'https://cdn.modrinth.com/placeholder.png'"
/>
</Head>
<ModalCreation ref="modal_creation" />
<ModalReport ref="modal_report" :item-id="user.id" item-type="user" />
<div class="user-header-wrapper">
@@ -420,7 +408,8 @@ if (user.value.username !== route.params.id) {
await navigateTo(`/user/${user.value.username}`, { redirectCode: 301 })
}
const metaDescription = ref(
const title = `${user.value.username} - Modrinth`
const description = ref(
user.value.bio
? `${formatMessage(messages.profileMetaDescriptionWithBio, {
bio: user.value.bio,
@@ -429,6 +418,14 @@ const metaDescription = ref(
: `${formatMessage(messages.profileMetaDescription, { username: user.value.username })}`
)
useSeoMeta({
title,
description,
ogTitle: title,
ogDescription: description,
ogImage: user.value.avatar_url ?? 'https://cdn.modrinth.com/placeholder.png',
})
const projectTypes = computed(() => {
const obj = {}