June 07, 2019
I can’t actually specific how significant this expertise was to me. An antithesis to the rat race of social media, IndieWebCamp was a roomful of kindred spirits that care in regards to the net and their very own web sites and internet hosting their very own content material. It felt just like the Google Reader days once more, when everybody was running a blog and writing on their very own websites. I dunno if you happen to can inform however I cherished it. When you get the prospect to attend considered one of these occasions, leap on it (I actually wish to run one in Omaha 👀).
Webmentions, Disqus, WordPress
On the occasion I acquired a working instance of webmentions occurring my private website. I already had a static copy of my outdated Disqus feedback that I’d exported (which included copies of outdated WordPress feedback that I’d imported into Disqus 😎).
Webmentions are made doable for static websites once you use webmention.io, a service to log incoming entries. One other service, Bridgy, crawls social networking websites for mentions of my website and sends these over to webmention.io mechanically.
If I’ve already misplaced you, fortunately Max Böck wrote up a beautiful tutorial on how to do that utilizing Eleventy (his website is superb, too). Max additionally created an
eleventy-webmentions starter venture which has all of the code for this. Hopefully we will get some type of this merged again into the upstream
You may see an instance of how the webmentions look on my website at considered one of my latest weblog posts: Google Fonts is Including
Internet hosting my very own content material and feedback permits me to be a bit extra inventive with it. So I made a decision to take this a step additional and have slightly enjoyable with unfavourable feedback.
First, how do we discover out if a remark is unfavourable? Let’s attempt to use Pure, a plugin on npm. I added a Liquid filter to my Eleventy configuration file to research textual content and spit out a sentiment worth.
zero is impartial,
< zero is unfavourable, and
> zero is optimistic. Be aware that this pure language processing isn’t 100% (generally I’ll get a false optimistic) however that is only a enjoyable demo on my website.
const Pure = require('pure');
const analyze = new Pure.SentimentAnalyzer("English", Pure.PorterStemmer, "afinn");
module.exports = perform(eleventyConfig) ;
After which in my Liquid template, I exploit this integer worth so as to add a
After which in my stylesheet, I exploit this class to opt-into a beautiful stack of Comedian Sans, Chalkboard, and naturally a fantasy fallback for kicks:
How does it look?
This was taken from an actual touch upon my website.
This isn’t meant to be a hot-take on Comedian Sans. As an alternative it’s meant to vary the tone of the negativity to make it sound like a clown is yelling at a child’s party.