Skip to content

Commit

Permalink
Better SEO
Browse files Browse the repository at this point in the history
  • Loading branch information
steel97 committed Jan 31, 2024
1 parent 39a1007 commit 4f678bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const route = useRoute();
const { t } = useI18n();
const img = useImage();
const backgroundImg = computed(() => {
const imgUrl = img('/images/bg.png', { width: 3500 })
const imgUrl = img('/images/bg.png', { width: 3500, format: "webp" })
return `url('${imgUrl}')`;
});
Expand All @@ -52,7 +52,7 @@ const meta = computed(() => {
},
{
name: "og:image",
content: img("/images/ogimage.png", { width: 251 }),
content: img("/images/ogimage.png", { width: 251, format: "webp" }),
},
{
name: "og:site_name",
Expand Down
9 changes: 5 additions & 4 deletions src/components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
py-2
md:py-3
">
<NuxtLink @click="navTo('/')" :aria-label="t('Core.Header.Logo')">
<NuxtImg src="/images/logo.png" width="96" height="auto" :alt="t('Core.Header.Logo')" />
<NuxtLink :to="localePath('/')" @click="navTo('/')" :aria-label="t('Core.Header.Logo')">
<NuxtImg src="/images/logo.png" width="96" height="auto" :format="'webp'" :alt="t('Core.Header.Logo')" />
<span class="invisible">{{ t('Core.Header.Logo') }}</span>
</NuxtLink>
<div class="-mr-2 -my-2 md:hidden">
<button type="button" class="
Expand Down Expand Up @@ -122,11 +123,11 @@ const router = useRouter();
const img = useImage();
const localeEN = computed(() => {
const imgUrl = img('/images/locales/en.png', { width: 64 })
const imgUrl = img('/images/locales/en.png', { width: 64, format: "webp" })
return `url('${imgUrl}')`;
});
const localeRU = computed(() => {
const imgUrl = img('/images/locales/ru.png', { width: 64 })
const imgUrl = img('/images/locales/ru.png', { width: 64, format: "webp" })
return `url('${imgUrl}')`;
});
Expand Down
2 changes: 1 addition & 1 deletion src/error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const meta = computed(() => {
},
{
name: "og:image",
content: img("/images/ogimage.png", { width: 251 }),
content: img("/images/ogimage.png", { width: 251, format: "webp" }),
},
{
name: "og:site_name",
Expand Down

0 comments on commit 4f678bd

Please sign in to comment.