markdown features
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
rei
2022-12-30 14:14:05 +01:00
parent e545a596ec
commit d397503c66
13 changed files with 651 additions and 95 deletions

View File

@@ -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();
}