Marty McGuire

Posts Tagged indieweb

2017
Thu Apr 13

Site updates: simplifying media, complicating mentions

Jonathan Prozzi and I have challenged one another to make a post about improving our websites once a week. I'm late with this one!

Most of the features on my website are experiments in learning new things. Sometimes I learn a better way of doing something that I've already built into the site and it's time to migrate!

Moving Media files from Git LFS to a Media Endpoint

I build my site with Jekyll, and I store my site's configuration and text content via Git. One of the things that most folks avoid with Git is storing text content (which fits into Git's model of efficiently storing differences over time) with large binary files like images, etc. (which Git cannot manage as efficiently).

When I first set up my site, I made use of Git LFS ("Large File Storage") for managing anything that wasn't text. Any images, video, or audio that I added to my site was stored in an _assets/ folder in a way that matched uploaded files to the posts they were a part of. Git LFS would transparently ship those files off to a secondary server rather than include their content in the Git repository itself. I had to go through some hoops to set up my local GitLab server to support Git LFS and to set up Git LFS with the server that handles receiving new posts via Micropub, compiling and deploying the site.

It turns out that there are many reasons that a site would want to handle media files separately from the text content that refers to them. In fact, it is a common enough pattern that the Micropub standard includes a definition for a separate "media endpoint" to handle file uploads. I shared a Micropub media endpoint implementation that I built called Spano a while back, and it has been working well with support from tools like Quill. So the text content of my site is served from https://martymcgui.re/, and my media files from https://media.martymcgui.re/. With a couple of changes in my code and my workflows, this has become the way I handle all media files for my site.

However, I still had a bunch of files in site being handled by Git LFS, and some of my Jekyll code (plugins and templates) for showing embeds expected files to be on the local filesystem. This past week I took some time to write some scripts to find all references to those local files, migrate them to my media server, and update the outgoing links. I also updated my embed handling so it didn't rely on local files. This let me delete a lot of local metadata I was keeping but not using, like all the EXIF tags in uploaded photos. I am now Git LFS free and it feels like one less thing to worry about.

Better Caching for Mentions from Webmention.io

When I finally started displaying webmentions, I had a very simple model for how to cache all the info from webmention.io. Basically: I stored all mentions in a big array and, when my site went to fetch new mentions, it would keep fetching until it saw the "last" mention again. This led to a bit of a bug where someone might send me a mention, update their page, and send the mention again. My site would not be able to recognize the "last" mention, so it would fetch all my mentions again, leading to everything appearing twice.

This past week I rewrote my mention handling to avoid this problem by replacing this array and storing mentions in a hash based on the source and target. The new code also checks to see if the verification date of the mention has changed (giving me a way to detect and notify about changed mentions in the future). I also reorganized my mention cache to include an index by the target URL on my site. This makes it a bit quicker to find mentions for a given page when rendering out the site.

Neither of these changes are really visible to readers of my site, but they have been useful for cleaning things up. The webmention.io handling in particular has brought my plugin a lot closer to being something I could release for other people to use!

Sat Apr 8

This Week in the IndieWeb Audio Edition • April 1st - 7th, 2017

Audio edition for This Week in the IndieWeb for April 1st - 7th, 2017.

You can find all of my audio editions here.

You can subscribe with your favorite podcast app on huffduffer.

Music from Aaron Parecki’s 100DaysOfMusic project: Day 48 - Glitch, Day 49 - Floating, Day 9, and Day 11

Thanks to everyone in the IndieWeb chat for their feedback and suggestions. Please drop me a note if there are any changes you’d like to see for this audio edition!

Fri Apr 7
☑ RSVP'd to an event https://2017.indieweb.org/
post
Mozilla Portland
IndieWeb Summit
The seventh annual gathering for independent web creators of all kinds, from graphic artists, to designers, UX engineers, coders, hackers, to share ideas, actively work on creating for their own personal websites, and build upon each others creations.
I'm going!

IndieWeb Summit in Portland, OR Jun 24-25th!

Looking forward to meeting some lovely IndieWeb folks!

Wed Apr 5

Site updates: showing emoji reactions

Inspired by Eddie Hinkle's recent post about viewing webmentions, I decided to improve the way I display webmentions on my site.

TL;DR, my site now pulls attempts to recognize single-emoji comments and display them as a "Reaction".

Slightly longer version - my site uses webmention.io for handling webmentions, and I use brid.gy to backfeed interactions from Facebook to my own site. The way brid.gy handles Facebook reactions other than the standard "like" is a little quirky - they show up in webmention.io as a "reply" with a single emoji as the "content".

Using the Ruby twemoji library, my site checks the "content" of a reply against the emoji index and, if the content is a single emoji, pulls it out of the usual "reply" display and puts it in a facepile. The emoji itself is shown as an icon in the corner of the little face image.

Example of some ❤️ reactions from Facebook

While I was at it, I cleaned up a lot of my webmention-handling template to make things much clearer. This will make things easier for folks that want to re-use this code when I (eventually) release this as a Jekyll plugin.

Tonight is a Homebrew Website Club night, but Baltimore is not having another official meetup until April 19th. Still, I wanted to get something done to continue my deal with Jonathan to post something IndieWeb related at least once per week.

Fri Mar 31

This Week in the IndieWeb Audio Edition • March 25th - 31st, 2017

Audio edition for This Week in the IndieWeb for March 25th - 31st, 2017.

You can find all of my audio editions here.

You can subscribe with your favorite podcast app on huffduffer.

Music from Aaron Parecki’s 100DaysOfMusic project: Day 48 - Glitch, Day 49 - Floating, Day 9, and Day 11

Thanks to everyone in the IndieWeb chat for their feedback and suggestions. Please drop me a note if there are any changes you’d like to see for this audio edition!

Wed Mar 29

Site updates: /mentions page and notifications

Jonathan Prozzi and I have challenged one another to make a post about improving our websites once a week. I'm a little late with this one!

I recently added support for displaying mentions, such as likes, reposts, comments, etc. from around the web that refer to the posts on my site. One thing the update didn't do is catch another type of mention, such as when someone mentions me in a tweet (example). These get fed to my website by brid.gy, but weren't displayed anywhere.

So, I created a /mentions page for displaying these mentions. In the future, when a post mentions my homepage, the result will show up on the mentions page.

Screenshot of the Recent Mentions page, including some tweets that mention @schmarty

My mentions still don't yet update in real time - they are compiled into my site whenever I make a new post. That's coming up in the future, but I have taken one more step towards real-time interactions with notifications!

Webmention.io, the service that I use for accepting and storing webmentions, has a WebHook option that can notify your site whenever a new webmention has been received. I wrote up a simple Python service using Flask that will listen for these messages from webmention.io and send them to me via PushBullet, a notification service that I've been using for a while for other projects.

Webmention.io WebHook configuration

Now, I'll see a notification on my phone and laptop when another site sends me a webmention!

Update: Here's an example notification!

Screenshot of a mobile notification from Pushbullet
PushBullet notification that I have received a new mention.
Sun Mar 26
↩ Replied to http://boffosocko.com/2017/03/25/this-week-in-the-indieweb-audio-edition-%e2%80%a2-march-18th-24th-2017/
post from 🎧 This Week in the Indieweb Audio Edition • March 18th – 24th, 2017
Listened to This Week in the IndieWeb Audio Edition • March 18th - 24th, 2017 by Marty McGuire from martymcgui.re

I write a text script for each of these audio editions, which I would like to find a way to add to the post as a transcript for the audio. A couple of (silly?) things stopping me: (1) I’m not sure of the best way to lay that out and mark it up for the widest use and (2) My script format includes lots of notes-to-self that need to be cleaned up, adding yet-another-editing-task to getting this podcast out. :}

Sat Mar 25

This Week in the IndieWeb Audio Edition • March 18th - 24th, 2017

Audio edition for This Week in the IndieWeb for March 18th - 24th, 2017.

You can find all of my audio editions here.

You can subscribe with your favorite podcast app on huffduffer.

Music from Aaron Parecki’s 100DaysOfMusic project: Day 48 - Glitch, Day 49 - Floating, Day 9, and Day 11

Thanks to everyone in the IndieWeb chat for their feedback and suggestions. Please drop me a note if there are any changes you’d like to see for this audio edition!

Thu Mar 23
↩ Replied to http://eddiehinkle.com/article/2017/03/receiving-webmentions.html

Congrats and have a Webmention! I love that you have a roadmap.

Something like WebSub (formerly PubSub) would be great for triggering a notification when a new Webmention arrives, without having to poll!

Wed Mar 22

HWC Baltimore 2017-03-22 Wrap-Up

Baltimore's Marty 2017 meetup for Homebrew Website Club met at the Digital Harbor Foundation Tech Center on Mar 22nd.

Notes from the "broadcast" portion of the meetup.

martymcgui.re has been busy since the last meeting. Added tags and displaying webmentions to his site. Launched Screech, a micropub client for posting audio. Uses it to post an audio edition of the This Week in the IndieWeb as a podcast. Started looking into better reply contexts for sites with no microformats2 info, maybe starting with Soundcloud (which requires using their API to convert permalinks into embeds) or using Aaron Parecki's X-Ray.

brianey.com missed the last meeting, so it's been a while. Working on a new site at thebrianyoung.com, set up his WordPress network to include IndieWeb plugins, including things like accepting Webmentions. Some small updates to imnotwrong.com. Committing to more (of everything) for next time.

eddiehinkle.com started blogging again back in February. Dusted off Jekyll and started delving back into IndieWeb. Reads a lot of books and wanted to have that info on his site from Goodreads. Uses a Node.js script to dump Goodreads data into Jekyll _data/ folder. Added microformats to pages. Posts project 365 photos to site, a little bit of a burden since everything is still manual. Current project is micropub. Plan is to set up a Node.js "controller" because he wants to do more responses and interactive things. Today added "On This Day", showing posts from the same day in previous years

maryreisenwitz.com was in the other half of the room working on laser-cutting projects, but did talk informally about wanting to add e-commerce to her site.

We discussed the shutdown of App.net, the upcoming micro.blog, the challenges of building everything yourself, and some of the laser-cutting projects that our host Mary was working on for an event next weekend.

Left-to-right: eddiehinkle.com, brianey.com, martymcgui.re

We hope that you'll join us for the next HWC Baltimore in April back here at the Digital Harbor Foundation Tech Center! Check back soon for the date!