🖼️ added images support
- Should investigate how to resize the image from .md specs
This commit is contained in:
@@ -20,7 +20,7 @@ export async function generateMetadata({
|
||||
}): Promise<Metadata> {
|
||||
const { slug } = await params
|
||||
const slugPath = slug.join('/')
|
||||
const post = getPostBySlug(slugPath)
|
||||
const post = await getPostBySlug(slugPath)
|
||||
|
||||
if (!post) {
|
||||
return { title: 'Articol negăsit' }
|
||||
@@ -68,7 +68,7 @@ function extractHeadings(content: string) {
|
||||
export default async function BlogPostPage({ params }: { params: Promise<{ slug: string[] }> }) {
|
||||
const { slug } = await params
|
||||
const slugPath = slug.join('/')
|
||||
const post = getPostBySlug(slugPath)
|
||||
const post = await getPostBySlug(slugPath)
|
||||
|
||||
if (!post) {
|
||||
notFound()
|
||||
|
||||
Reference in New Issue
Block a user