web-difarft/app/pages/index.vue

122 lines
3.1 KiB
Vue

<script setup lang="ts">
import HeroSection from "../components/sections/home/hero.vue";
import StatsSection from "../components/sections/home/StatsSection.vue";
import AboutSection from "../components/sections/home/AboutSection.vue";
import ServicesSection from "../components/sections/home/ServicesSection.vue";
import TechStackSection from "../components/sections/home/TechStackSection.vue";
import ProjectsSection from "~/components/sections/home/ProjectsSection.vue";
import ContactSection from "~/components/sections/home/ContactBusinessCard.vue";
const route = useRoute();
const { locale } = useI18n();
const canonicalUrl = computed(() =>
route.path === "/en" ? "https://difarft.com/en" : "https://difarft.com/",
);
const seo = computed(() => {
if (locale.value === "en") {
return {
title: "Difarft — Dimas Fata | Developer & Network Support",
description:
"Difarft is the personal brand of Dimas Fata, covering software development, web applications, backend systems, networking, and IT infrastructure.",
ogDescription:
"Difarft is the personal brand of Dimas Fata, covering software development, networking, and IT infrastructure.",
};
}
return {
title: "Difarft — Dimas Fata | Developer & Network Support",
description:
"Difarft adalah personal brand Dimas Fata yang mencakup pengembangan software, aplikasi web, sistem backend, jaringan, dan infrastruktur IT.",
ogDescription:
"Difarft adalah personal brand Dimas Fata di bidang pengembangan software, jaringan, dan infrastruktur IT.",
};
});
const languageLinks = [
{
hreflang: "id",
href: "https://difarft.com/",
},
{
hreflang: "en",
href: "https://difarft.com/en",
},
{
hreflang: "x-default",
href: "https://difarft.com/",
},
];
useHead({
htmlAttrs: {
lang: () => locale.value,
},
link: [
{
rel: "canonical",
href: canonicalUrl,
},
...languageLinks.map((link) => ({
rel: "alternate",
hreflang: link.hreflang,
href: link.href,
})),
],
script: [
{
type: "application/ld+json",
innerHTML: JSON.stringify([
{
"@context": "https://schema.org",
"@type": "Person",
name: "Dimas Fata",
jobTitle: "Developer & Network Support",
url: "https://difarft.com/",
sameAs: [
"https://www.instagram.com/difarft.02/",
"https://www.linkedin.com/in/dimas-fata-5324aa2aa/",
],
},
{
"@context": "https://schema.org",
"@type": "WebSite",
name: "Difarft",
url: "https://difarft.com/",
},
]),
},
],
});
useSeoMeta({
title: () => seo.value.title,
description: () => seo.value.description,
ogTitle: () => seo.value.title,
ogDescription: () => seo.value.ogDescription,
ogImage: "https://difarft.com/og-image.png",
ogUrl: canonicalUrl,
ogType: "website",
twitterCard: "summary_large_image",
});
</script>
<template>
<HeroSection />
<StatsSection />
<AboutSection />
<ServicesSection />
<TechStackSection />
<ProjectsSection />
<ContactSection />
</template>