eyeseast / python-frontmatter

Parse and manage posts with YAML (or other) frontmatter
http://python-frontmatter.rtfd.io
MIT License
329 stars 43 forks source link

Add handler.format to customize string output #79

Closed eyeseast closed 3 years ago

eyeseast commented 3 years ago

Closes #49. Also gives a better solution to #67.

This change allows you to more fully customize both input and output. Use handler.split to decide how to separate content and metadata, handler.parse to turn front matter into a dictionary, and finally, handler.format to turn the whole thing back into a string.