WIP - Basic webmention support
Related Issue Was discussed in email with repo owner. [Angelo: Issue #40 opened to track this]
Issue mentioned in post: https://fireburn.ru/post/why-my-site-looks-as-it-does/
Dependency Changes Added jQuery. Can be removed if someone bothers to port comment section in single.html to vanilla JS.
Testing
- [x] Built and tested to work on a standalone Hugo site
- [ ] Built and tested to work in the Hugo Theme Gallery demo site (link)
- [ ] Tested with browser's responsive-design tools
- [x] Tested in production
Additional context Like buttons are not included because:
- More JS would be needed (one JS per post)
- The design is not polished yet
Thanks so much for submitting this PR! I've opened #40 for some additional tracking and will start reviewing your changes.
I've added WIP ("Work In Progress") to signal that this isn't yet ready to merge.
So this is taking a lot longer than I expected, as I learn about the intricacies of webmentions myself.
One thing that I'm wondering is if it's worth downloading the whole jQuery library if we're only really interested in $.getJson() — most modern browsers support ES6's fetch(), which might be a little more lightweight (IE doesn't support it, so we might need a polypill there).
One thing that I'm wondering is if it's worth downloading the whole jQuery library if we're only really interested in
$.getJson()— most modern browsers support ES6'sfetch(), which might be a little more lightweight (IE doesn't support it, so we might need a polypill there).
See youmightnotneedjquery.com for some tips on how to replace jQuery and even remain compatible with some reasonably recent versions of IE.
But seriously, I think alsmot nobody uses IE anymore.
Also CDN requests should be cached in browsers, if I understand it properly, so I don't think jQuery requirement should be a problem for most users. But don't count on my knowledge for this since I'm not sure.
About 88% of users can use fetch(). According to that, IE is still in use by ~2.5% of users.