front-matter icon indicating copy to clipboard operation
front-matter copied to clipboard

FEATURE REQUEST rebundle modified front-matter object into markdown

Open dimaslanjaka opened this issue 3 months ago • 0 comments

i was trying modify date from attribute.

console.log(`File: ${file}, Creation Date: ${creationDate}`);
	const read = fs.readFileSync(path.join(process.cwd(), file), {
		encoding: "utf-8",
	});
	try {
		const parse = fm(read);
		parse.attributes.date = creationDate;
		console.log(parse);
	} catch (error) {
		console.error(`fail parse ${file}`);
	}

the main problem is, how to rebundle into markdown front-matter format ?

---
title: xxxx
any other attributes
---

body string

add the function please

dimaslanjaka avatar Apr 11 '24 12:04 dimaslanjaka