Zach’s ugly mug (his face) Zach Leatherman

Archive your Tweets with Tweetback

November 28, 2022

Twitter, it’s not me—it’s you.

In October of 2019, I gave a talk at Jamstack Conf San Francisco titled Owning your Content on Social Media.

For this talk I built a social media platform: MySpaceBook.​info, the only social media site exclusively for astronauts. Unfortunately midway through the presentation an investor called me up to make an offer on the site and I was left with no choice but to sell it, taking all of the user data down with it.

Apropros of nothing and in no way related to the scenario foretold in prophecy, I’m no longer hanging around on Twitter.

In the Jamstack Conf talk, I went through how one might build a local archive of your Twitter content, as I had done and documented separately a month or two prior. This archive now lives at zachleat.com/twitter/.

Cue crickets.

As Eleventy started to take off, I suddenly had very limited time to dedicate to cleaning up this archive for others to use. A lot of folks asked me about it and whether I was going to open source it. I always punted—it felt like an open source burden that I just didn’t have the bandwidth to take on. This continued for, well… years! Until a few weeks ago when long-time Eleventy community member IndieWeb Avatar for https://nicolas-hoizey.comNicolas Hoizey volunteered to help maintain the thing!

Tweetback

And thus, Tweetback was shipped.

Build Performance at Scale

Tweetback is built with Eleventy and I do think Eleventy plays a special role here. Eleventy is a production ready, stable site generator that now has very concrete public proof of ~50,000 and > 100,000 page builds.

Given tests previously conducted across a variety of site generators in the JavaScript ecosystem, this reveals the unique space that Eleventy lives in (and a competitive advantage). With all due respect to the unique capabilities of other tools, I do not think Next.js or Gatsby or Astro would be able to handle a similar scale of project. I do welcome evidence to the contrary!

Tweetback Features

  • Each tweet has its own independent URL (with backwards/forwards threading!)
  • (This is my favorite) Tweetback globally replaces canonical twitter URLs to point to other known archives:
    • Archives known to @tweetback/canonical will change twitter.com URLs to use decentralized archive production URLs instead.
  • t.co links are transformed to the original hyperlink URL.
  • Locally cache the high quality versions of images.
  • Links to users, tweets, non-truncated URLs.
  • Nicer link formatting for links-to-tweets: @username/:id.
  • Translates `backtick` markdown notation to <code> properly.
  • Analytics:
    • See your most popular tweets
    • Who you retweet the most
    • Who you reply to the most
    • Frequently used swear words
    • Top emoji
    • Top hashtags

Demos (at time of writing)

  • @zachleat: https://www.zachleat.com/twitter/
  • @eleven_ty: https://twitter.11ty.dev/
  • @nhoizey: https://twitter.nicolas-hoizey.com
  • @matthewcp: https://matthewphillips.info/tweets/
  • @rknightuk: https://hellsite.rknight.me
  • @steren: https://twitter.steren.fr
  • @saneef: https://tweets.saneef.com/
  • @accudio: https://twitter.alistairshepherd.uk
  • @cutewitchphoebe: https://twitter.catgirlin.space
  • @type__error: https://twitter.localghost.dev
  • @Chr1sHayes: https://tweetback.hayes.software
  • @terribleMia: https://tweets.miriamsuzanne.com
  • @iamchrisburnell: https://twitter.chrisburnell.com
  • @overflowhidden: https://tweets.kimjohannesen.dk

Now you!

If you’ve been discouraged by Twitter’s direction, a great start to moving away from Twitter is to get your data off of the service. Tweetback can help you do that.

If you ship a Tweetback site, I’d love to hear about it on Mastodon 😇.


< Newer
Jamstack Community Survey 2022 Results
Older >
The State of Eleventy (2022) in Two Minutes

Zach Leatherman IndieWeb Avatar for https://zachleat.com/is a builder for the web at IndieWeb Avatar for https://fontawesome.com/Font Awesome and the creator/maintainer of IndieWeb Avatar for https://www.11ty.devEleventy (11ty), an award-winning open source site generator. At one point he became entirely too fixated on web fonts. He has given 83 talks in nine different countries at events like Beyond Tellerrand, Smashing Conference, Jamstack Conf, CSSConf, and The White House. Formerly part of CloudCannon, Netlify, Filament Group, NEJS CONF, and NebraskaJS. Learn more about Zach »

61 Reposts

Pablo Lara HTyJean François PorchezAle GrillitimothyceegeemarkkuAaron Gustafsonwook :endeavourOS:Marc GörtzJanleonpaternosterAlexander LehnerSterenDaniel PaveyJojanneke van den BoschgvenkMartin GrubingerChrissy Hunt 👩‍💻Nicu SoareAddy OsmaniRyuno-KiNick TaylorMatthias OttDaniel Beutner 🦄fabian wohlgemuth (he/him)Peter F. EbbinghausKevin C. TofelJohan van der KnijffTobias ZeumerGiulio Cesare SolaroliCosima WagnerRoxana Maurer-PopistașuOtto RaskColinautQuinn DombrowskiMoussa ClarkecarlynDavid's Alter (Algo) EgoAndrew N. Jacksonmeduz'Philip KiffManfred Linzner-ScherfSarahEleventy 🎈 v2.0.0-canary.18Nicolas HoizeyBen Myers 🦖Boris MannFynn BeckerAndy BellMathieuMatthew Phillipsthomas 🌸Steve KarschTyler StickaSarah Fossheim :verified_gay:Doug ParkerSaneef AnsariMat RoseroMura 💜💚Steve Workman -- @steveworkman@webperf.social현빈 | Hyunbin

58 Likes

timothyceegeeEric McCormickmarkkuMatt WilcoxBer Baquero Stand 🎸mraerinoandregil@mastodon.com.brAlex Nedelcu :java:Martin GrubingerMatt FarmerIkeJojanneke van den BoschRonalds VilciņšChrissy Hunt 👩‍💻gvenkMatthias OttRobin RendleFredy R. Guibert フレディNedMark C MarinoAlan LiuPhilip AllfreyGiulio Cesare SolaroliAlistair ShepherdNemo_bis 🌈Jill AndersonOtto RaskLambert HellerBen SevenFernando MateusMoussa ClarkederekDoctor PopularQuinn DombrowskiColinautDavid ColarussoPhilip KiffJesse Heady (@jheady on 🐦)Maaret PyhäjärviTyMat RoserocodyMura 💜💚Eleventy 🎈 v2.0.0-canary.18Nicolas HoizeyLaker J.V :fediverse:Jacob Tender :mastodon:Fynn BeckerMathieuBoris MannMatthew PhillipsJeff Knaackmarie destandau - ototoïthomas 🌸Alesandro Ortiz 🇵🇷🏳️‍🌈Tyler StickaMaren Pan :pensive_party_blob:Ari Koponen :verified:
10 Comments
  1. Nicolas Hoizey

    @zachleat hi! 😅

  2. @zachleat okay but what if you like...you deleted them every 7 days for years.can someone hack twitter please. i need my "deleted" tweets.@nhoizey @eleventy

  3. Robin Rendle

    @zachleat @nhoizey @eleventy Dumb question incoming! There’s no way to look through the whole archive by year or month at all is there?

  4. Marco Zehe

    @zachleat @nhoizey @eleventy I tried running this yesterday, and while it imported all tweets into the database, after I did some juggling with database/tweets.js, database/tweets-part1.js, and database/tweets-part2.js, the actual building of the site failed after the passthrough… Truncated

  5. @niel@thiart.com

    You could create a public archive zachleat.com/web/tweetback/

  6. Mikka

    @zachleatWhen is the last time I told you, you're the GOAT? Seriously, man, you are. Do me a favor and relax over the holidays? The past year was a flurry of "damn, 11ty is getting better and better," even heroes need rest.@eleventy

  7. Zach Leatherman :11ty:

    @mikka hah! Appreciate it—happy to be doing what I love over here ❤️ but yes I do need a bit of time off too 🙌🏻

  8. Mikka

    @zachleatDone! https://mikka.md/tweet/ (I guess I'll take the "starter project" part seriously and turn it into something a little more Mikka-style whenever I don't feel like playing WoW or am traveling.)@eleventy medimikka’s Twitter Archive

  9. @samkap cheers, I had a feeling it had a @zachleat shape to it 🙏

  10. Chris

    Personally I’m taking the approach of trying to build an archive of my tweets that I could reference, search, and index in Google - but not worry about moving it within Mastodon? i.e. zachleat.com/web/tweetback/

Shamelessly plug your related post

These are webmentions via the IndieWeb and webmention.io.

Sharing on social media?

This is what will show up when you share this post on Social Media:

How did you do this? I automated my Open Graph images. (Peer behind the curtain at the test page)