convert markdown files with frontmatter to json