extract frontmatter into a single json file