Skip to content

Commit

Permalink
fix: remove baseUrl from json-lg image in detail blog page (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
rezafikkri authored Dec 20, 2024
2 parents ad37767 + c54a5e4 commit f1d29f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/blogs/[slug]/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import { getPost, getSlugs, getTopics } from "@/lib/posts.mjs";
import FormatTime from "@/components/format-time";
import getBaseUrl from "@/lib/get-base-url";

const baseUrl = getBaseUrl();

export async function generateMetadata({ params }) {
const slug = (await params).slug;
const post = getPost(slug);
const baseUrl = getBaseUrl();

return {
title: post.title,
Expand All @@ -32,13 +33,12 @@ export default async function Page({ params }) {
const slug = (await params).slug;
const post = getPost(slug);
const topics = getTopics(post.topics);
const baseUrl = getBaseUrl();

const jsonLd = {
'@context': 'https://schema.org',
'@type': 'Article',
headline: post.title,
image: [ baseUrl + post.ogImage ],
image: [ post.ogImage ],
dateModified: dayjs(post.lastmod).toISOString(),
author: [
{
Expand Down

0 comments on commit f1d29f5

Please sign in to comment.