You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
444 B

export const parseTags = (strings) => {
const postTags = keys
.map((key, index) => {
const value = values[index];
// Parse yaml metadata & markdownbody in document
const document = matter(value.default);
const rawTags = document.data?.tags || "";
return rawTags.split(",").map((tag) => tag.trim());
})
.flat()
.filter((value) => value !== "");
};