webmention.io
webmention.io copied to clipboard
Provide example javascript rendering code
It would be nice if there was some example code that fetches the webmentions for an URL and then takes the JSON data and actually renders the HTML and appends it to the page.
Use case would be not-so-technical users that want to use webmention.io on their static site.
Related to #94.
Related:
- https://gist.github.com/thedod/78b14341e39ca0d09131
- Static rendering in Hugo: https://gitlab.com/kaushalmodi/hugo-theme-refined/blob/master/layouts/partials/webmention_rcv.html
I implemented web mentions for my blog at https://mxstbr.com/thoughts, which is a React app built with Next.js. Here is the source for the components that fetch and render web mentions! https://github.com/mxstbr/mxstbr.com/tree/master/components/WebMentions
Hope that can be helpful for somebody 👍
There's also https://github.com/PlaidWeb/webmention.js which a few of the community are using :smile:
Hello everyone!
I've written a new rendering component - it's a WebComponent, so it should work for most sites.
GitHub | NPM | StackBlitz (modify the target
to show the webmention of the corresponding page)