mf2utiljs
v1.1.0
Published
A typescript port of mf2util, a library for interpreting mf2 parsed documents
Downloads
44
Maintainers
Readme
mf2utilsjs
This is a rough, incomplete Typescript port of Kara Mahan's mf2util python library, mostly so that I'd have something to use in my new eleventy powered blog. It imposes a kind of domain level interpretation on mf2 results so that you can use the results more easily in, for example, a reply context or a link preview.
Given that I've switched over to using webmention.io for my webmention support, I've skipped porting the webmention part of the library. I also have yet to port over the location processing.
Microformats are a flexible way to sprinkle meta information in a web page, and there are several microformat parsers available, but the parsing results are often not very convenient to use. This library will, like mf2utils, take the mf2 results and:
- Extract the first string of every property when it's appropriate, which it is most of the time.
- Implement the authorship algorithm to figure out who wrote the post.
