feat: update Next.js configuration and blog post rendering

This commit is contained in:
Mauricio Siu 2025-03-11 01:22:52 -06:00
parent 99b60ee362
commit 88fa959bba
3 changed files with 4 additions and 3 deletions

View File

@ -46,6 +46,7 @@ export function CodeBlock({ code, lang, initial }: CodeBlockProps) {
async function formatAndHighlight() {
try {
console.log("Original code:", code);
console.log("Language:", lang);
const formatted = await formatCode(code, lang);
setFormattedCode(formatted);

View File

@ -329,10 +329,9 @@ export default async function BlogPostPage({ params }: Props) {
<div className="bg-card rounded-lg overflow-hidden h-full shadow-lg transition-all duration-300 hover:shadow-xl border border-border">
{relatedPost.feature_image && (
<div className="relative h-48 w-full">
<Image
src={relatedPost.feature_image}
<img
src={relatedPost.feature_image || "/og.png"}
alt={relatedPost.title}
fill
className="object-cover"
/>
</div>

View File

@ -16,6 +16,7 @@ const nextConfig = {
"testing-ghost-8423be-31-220-108-27.traefik.me",
"images.unsplash.com",
"www.gravatar.com",
"cms.dokploy.com",
],
},
};