Skip to content

Commit

Permalink
beginning of seo improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeb4dev committed Jan 8, 2024
1 parent 2b88e47 commit 9ccca11
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions app/src/components/SEO.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<script setup lang="ts">
import { defineProps } from 'vue';
defineProps<{
seo: object;
}>();
const config = useRuntimeConfig();
</script>

<template>
<Head>
<!-- Default -->
<Meta name="viewport" content="width=device-width, initial-scale=1.0" />
<Meta charset="UTF-8" />
<Title>Serveri ry</Title>
<Meta
name="description"
content="Itä-Suomen yliopiston Kuopion kampuksen tietojenkäsittelytieteen opiskelijoiden ainejärjestö."
/>
<Meta
name="keywords"
content="Serveri, Serveri ry, Tietojenkäsittelytiede, UEF, Itä-Suomen yliopisto, Ainejärjestö, Kuopio, TKT"
/>
<Meta name="robots" content="index,follow" />
<!-- Open Graph-->
<Meta name="og:title" content="Serveri ry" />
<Meta
name="og:description"
content="Itä-Suomen yliopiston Kuopion kampuksen tietojenkäsittelytieteen opiskelijoiden ainejärjestö."
/>
<Meta name="og:image" :content="config.public['API_URL'] + 'assets/b3ed6d7f-c124-4136-9234-cbd91fccff0f'" />
<Meta name="og:url" content="https://serveriry.fi/" />
<Meta property="og:locale" :content="$i18n.locale" />
<Meta property="og:type" content="website" />
<Meta property="og:site_name" content="Serveri ry" />
<Meta property="og:locale:alternate" :content="$i18n.locale === 'fi' ? 'en_US' : 'fi_FI'" />
<!-- Icon -->
<Link rel="icon" href="/images/rotta.svg" />

<!-- From API -->
<Title v-if="seo.title"> {{ seo.title }} </Title>
<Meta
name="robots"
:content="[seo.no_follow ? 'nofollow' : 'follow', seo.no_index ? 'noindex' : 'index'].join(',')"
/>
<Meta v-if="seo.description" name="description" :content="seo.meta_description" />
<Meta v-if="seo.keywords" property="keywords" :content="seo.keywords" />
<!-- Open Graph-->
<Meta v-if="seo.title" property="og:title" :content="seo.title" />
<Meta v-if="seo.description" property="og:description" :content="seo.meta_description" />
<Meta name="og:image" :content="config.public['API_URL'] + 'assets/' + seo.og_image" />
<Meta property="og:url" :content="seo.canonical_url" />
<link rel="canonical" :href="seo.canonical_url" />
<link rel="alternate" :href="seo.canonical_url" hreflang="fi" />
</Head>
</template>

0 comments on commit 9ccca11

Please sign in to comment.