This commit is contained in:
@@ -4,6 +4,7 @@ import fs from "fs";
|
||||
import { FrontMatter, MarkdownDocument } from "../types/types";
|
||||
import { remark } from "remark";
|
||||
import html from "remark-html";
|
||||
import remarkGfm from "remark-gfm";
|
||||
|
||||
export const BLOGS_PATH = join(process.cwd(), "content/blogs");
|
||||
export const PROJECTS_PATH = join(process.cwd(), "content/projects");
|
||||
@@ -57,7 +58,7 @@ export const getAllProjectsFrontMatter = (): Post[] => {
|
||||
};
|
||||
|
||||
export async function markdownToHtml(markdown: any) {
|
||||
const result = await remark().use(html).process(markdown);
|
||||
const result = await remark().use(html).use(remarkGfm).process(markdown);
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user