{post.title}
diff --git a/app/blogs/page.jsx b/app/blogs/page.jsx index 456c100..b2601f7 100644 --- a/app/blogs/page.jsx +++ b/app/blogs/page.jsx @@ -1,20 +1,23 @@ import { getTopics, getPosts } from "@/lib/posts"; import LargeTopics from "@/components/post/large-topics"; import PostList from "@/components/post/post-list"; +import getBaseUrl from "@/lib/get-base-url"; const title = "Blog"; const description = "Kumpulan tulisan mengenai programming dan teknologi secara umum."; +const baseUrl = getBaseUrl(); + export const metadata = { title, description, openGraph: { title, description, - url: '/blogs', + url: `${baseUrl}/blogs`, images: [ { - url: '/Reza logo.svg', + url: `${baseUrl}/Reza logo.svg`, width: 744, height: 744, }, diff --git a/app/blogs/topic/[topic]/page.jsx b/app/blogs/topic/[topic]/page.jsx index 8820c1f..27e59ae 100644 --- a/app/blogs/topic/[topic]/page.jsx +++ b/app/blogs/topic/[topic]/page.jsx @@ -1,10 +1,12 @@ import { getPosts, getTopicId, getTopics } from "@/lib/posts.mjs"; import PostList from "@/components/post/post-list"; import LargeTopics from "@/components/post/large-topics"; +import getBaseUrl from "@/lib/get-base-url"; export async function generateMetadata({ params }) { const selectedTopic = (await params).topic; const description = `Kumpulan tulisan mengenai ${selectedTopic}.`; + const baseUrl = getBaseUrl(); return { title: selectedTopic, @@ -12,10 +14,10 @@ export async function generateMetadata({ params }) { openGraph: { title: selectedTopic, description: description, - url: `/blogs/topics/${selectedTopic}`, + url: `${baseUrl}/blogs/topics/${selectedTopic}`, images: [ { - url: '/Reza logo.svg', + url: `${baseUrl}/Reza logo.svg`, width: 744, height: 744, }, diff --git a/app/layout.jsx b/app/layout.jsx index 58626a8..59ac2bd 100644 --- a/app/layout.jsx +++ b/app/layout.jsx @@ -29,8 +29,8 @@ const baseUrl = getBaseUrl(); export const metadata = { metadataBase: new URL(baseUrl), title: { - template: "%s - Reza Sariful Fikri", - default: "Reza Sariful Fikri" + template: `%s - ${process.env.SITE_NAME}`, + default: process.env.SITE_NAME, }, verification: { google: 'fLcDg3KFF-m2xDnm4TGsRylXksSQTGGfLq6FqSe8cUs', diff --git a/app/page.jsx b/app/page.jsx index 17b12da..40e5966 100644 --- a/app/page.jsx +++ b/app/page.jsx @@ -4,22 +4,23 @@ import LargeTopics from "@/components/post/large-topics"; import HomeHeader from "@/components/home/home-header"; import HomePostList from "@/components/home/home-post-list"; import ProjectList from "@/components/project/project-list"; +import getBaseUrl from "@/lib/get-base-url"; -const title = "Reza Sariful Fikri - Backend Web Developer"; -const description = "Website yang membahas mengenai programming, khususnya di bidang pengembangan web dan hal-hal umum seputar teknologi."; +const title = `Website Pribadi Reza Sariful Fikri - ${process.env.SITE_NAME}`; +const description = 'Website yang membahas mengenai programming, khususnya di bidang pengembangan web dan hal-hal umum seputar teknologi.'; +const baseUrl = getBaseUrl(); export const metadata = { - title: { - absolute: title - }, + title, description, openGraph: { title, description, - url: '/', + url: baseUrl, + siteName: process.env.SITE_NAME, images: [ { - url: '/rezas.jpg', + url: `${baseUrl}/rezas.jpg`, width: 400, height: 400, }, @@ -32,8 +33,19 @@ export default function Page() { const topics = getTopics(); const latestPosts = getLatestPosts(); + const jsonLd = { + '@context': 'https://schema.org', + '@type': 'WebSite', + name: process.env.SITE_NAME, + url: baseUrl, + }; + return ( <> +Halo, Saya Reza!
+Hai, Saya Reza
Ini adalah website pribadi saya.
Dalam website ini saya menulis mengenai programming, khususnya di bidang pengembangan web, menggunakan bahasa PHP dan JavaScript dan hal-hal umum seputar teknologi. Selain itu saya juga suka membuat aplikasi open-source.