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() { async function formatAndHighlight() {
try { try {
console.log("Original code:", code); console.log("Original code:", code);
console.log("Language:", lang);
const formatted = await formatCode(code, lang); const formatted = await formatCode(code, lang);
setFormattedCode(formatted); 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"> <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 && ( {relatedPost.feature_image && (
<div className="relative h-48 w-full"> <div className="relative h-48 w-full">
<Image <img
src={relatedPost.feature_image} src={relatedPost.feature_image || "/og.png"}
alt={relatedPost.title} alt={relatedPost.title}
fill
className="object-cover" className="object-cover"
/> />
</div> </div>

View File

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