🖼️ added support for links to blogposts and support image sizing from .md files

This commit is contained in:
RJ
2025-11-24 14:31:57 +02:00
committed by Rares J
parent a039528fb3
commit 1baef49f73
6 changed files with 85 additions and 42 deletions

View File

@@ -6,6 +6,7 @@ import remarkGfm from 'remark-gfm'
import { FrontMatter, Post } from './types/frontmatter'
import { generateExcerpt } from './utils'
import { remarkCopyImages } from './remark-copy-images'
import { remarkInternalLinks } from './remark-internal-links'
const POSTS_PATH = path.join(process.cwd(), 'content', 'blog')
@@ -75,6 +76,7 @@ export async function getPostBySlug(slug: string | string[]): Promise<Post | nul
publicDir: 'public/blog',
currentSlug: sanitized.join('/'),
})
.use(remarkInternalLinks)
.process(content)
const processedContent = processed.toString()