indigo icon indicating copy to clipboard operation
indigo copied to clipboard

WIP - Basic webmention support

Open vikanezrimaya opened this issue 7 years ago • 5 comments

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:

  1. More JS would be needed (one JS per post)
  2. The design is not polished yet

vikanezrimaya avatar Nov 10 '18 19:11 vikanezrimaya

Thanks so much for submitting this PR! I've opened #40 for some additional tracking and will start reviewing your changes.

AngeloStavrow avatar Nov 14 '18 12:11 AngeloStavrow

I've added WIP ("Work In Progress") to signal that this isn't yet ready to merge.

AngeloStavrow avatar Nov 14 '18 12:11 AngeloStavrow

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).

AngeloStavrow avatar Nov 19 '18 00:11 AngeloStavrow

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).

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.

vikanezrimaya avatar Nov 19 '18 14:11 vikanezrimaya

About 88% of users can use fetch(). According to that, IE is still in use by ~2.5% of users.

dpflug avatar Nov 23 '18 21:11 dpflug