Skip to content

Commit

Permalink
switch to nice import
Browse files Browse the repository at this point in the history
  • Loading branch information
biltongza committed Oct 27, 2024
1 parent 3311439 commit 1d804ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/lib/blog/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import remarkGfm from 'remark-gfm';
import remarkParse from 'remark-parse';
import remarkRehype from 'remark-rehype';
import remarkUnwrapImages from 'remark-unwrap-images';
import * as vfile from 'to-vfile';
import { read } from 'to-vfile';
import { unified } from 'unified';

const remarkParser = unified().use(remarkParse).use(remarkGfm).use(remarkFrontmatter, ['yaml']);
Expand Down Expand Up @@ -41,7 +41,7 @@ export async function processMetadata(
log?: (...args: unknown[]) => void
): Promise<{ metadata: BlogMetadata; tree: Root }> {
const start = Date.now();
const file = await vfile.read(filename);
const file = await read(filename);
const fileRead = Date.now();
const remarkTree = remarkParser.parse(file);
const parsed = Date.now();
Expand Down

0 comments on commit 1d804ff

Please sign in to comment.