Skip to content

useSeoMeta

Debes agregar el código siguiente en el <script>

import { companyApiService } from "@/services/companyApiService";
onBeforeMount(async () => {
const { data } = await useServices<Company>(companyApiService);
response.value = data;
useHead({
link: [
{
rel: "canonical",
href:
response.value?.seo?.canonicalURL || "https://alebateducation.com/",
},
],
});
useSeoMeta({
title: response.value?.seo?.metaTitle || "Alebat Education - Compañía",
robots: response.value?.seo?.metaRobots || "index, follow",
author: "Alebat Education",
ogTitle: response.value?.seo?.metaTitle || "Alebat Education",
description: response.value?.seo?.metaDescription || "Alebat Education",
ogDescription: response.value?.seo?.metaDescription || "Alebat Education",
ogImage: response.value?.seo?.metaImage.url || "",
ogUrl: response.value?.seo?.canonicalURL || "https://alebateducation.com/",
twitterTitle: response.value?.seo?.metaTitle || "Alebat Education",
twitterCard: "summary_large_image",
});
});

Para que los motores de búsqueda no indexen la página debemos agregar el siguiente código. Esto se agregará en páginas como login, registro, carrito, etc.

useSeoMeta({
robots: "noindex, nofollow",
});