A walkthrough of building a Mastodon-powered comment system for a static blog, replacing Disqus after it dropped its free ad-free tier. Covers fetching replies via the Mastodon API, parsing JSON to extract commenter data, generating HTML with flexbox CSS, handling media attachments, implementing a blacklist for moderation, and managing the chicken-and-egg deployment order. The implementation is JavaScript-only, client-side, with no server component required.

12m read timeFrom beej.us
Post cover image
Table of contents
AudienceGetting the Post IDMy Site GeneratorWhat's the API?JavaScript at LastBuilding the HTMLMedia AttachmentsReplyingBlacklistingChicken and EggMaiden VoyageComments

Sort: