vblog
Viewing readonly version: 212View latest version
Script
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import graymatter from "npm:gray-matter";
import type { Plugin, Post } from "./types";
export const frontmatter: Plugin = async (post: Post) => {
const { content, data } = graymatter(post.content);
return {
...post,
metadata: {
...post.metadata,
data,
},
content,
};
};
H
www