Take ownership of your Twitter data. First talked about at Jamstack Conf 2019 and in this blog post.
- Built with Eleventy
- Each tweet has its own independent URL (with backwards/forwards threading!)
- Uses
@tweetback/canonical
to resolve other Twitter archives URLs (internal links stay in the archive and don’t link out to Twitter). t.co
links are bypassed and original hyperlinks URLs are used.- Links to users, tweets, non-truncated URLs.
- Nicer link formatting for links-to-tweets: @username/:id.
- Support some markdown: I sometimes use
backtick
markdown notation for code in my tweet text. This translates 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
- Copy
./data/tweets.js
from your Twitter Archivezip
file into the./database
directory of this project. - Rename
window.YTD.tweet.part0
intweets.js
tomodule.exports
- Run
npm run import
- Edit the
_data/metadata.js
file to add metadata information. - Run
npm run build
ornpm start
Note that the first build may take quite a long time (depending on the size of your archive), as remote media is fetched/downloaded into your project locally. Repeat builds will be much faster.
If you want to fetch additional tweets from the API and put them into your sqlite database:
- You will need a twitter developer token an a
TWITTER_BEARER_TOKEN
environment variable (from the Twitter API v2). - Run
npm run fetch-new-data