From 268e69abdda55f266d30b72e18ac1d523ede02bf Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Mon, 26 Feb 2024 14:22:40 -0500 Subject: [PATCH] Frontmatter getter for type --- src/frontmatter/type.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/frontmatter/type.js diff --git a/src/frontmatter/type.js b/src/frontmatter/type.js new file mode 100644 index 0000000..25bfab4 --- /dev/null +++ b/src/frontmatter/type.js @@ -0,0 +1,5 @@ +// get type, often this will always be "post" +// but can also be "page" or other custom types +module.exports = (post) => { + return post.data.post_type[0]; +}