🖼️ added support for links to blogposts and support image sizing from .md files
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user