netlify
netlify
add tweets
tweetback
Twitter ArchiveTake ownership of your Twitter data. First talked about at Jamstack Conf 2019 and in this blog post.
@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.backtick
markdown notation for code in my tweet text. This translates to <code>
properly.cd
to the folder of the projectnpm install
./data/tweets.js
from your Twitter Archive zip
file into the ./database
directory of this project.
window.YTD.tweet.part0
in tweets.js
to module.exports
./data/twitter-circle-tweet.js
from your Twitter Archive zip
file into the ./database
directory of this project.
window.YTD.tweet.part0
in twitter-circle-tweet.js
to module.exports
npm run import
or npm run import-without-circles
_data/metadata.js
file to add metadata information.npm run build
(will just create the proper files) or npm start
(will run a server to look at them in your browser).
/twitter/
), use Eleventy’s Path Prefix feature via the command line --pathprefix=twitter
or via a return object in your configuration file. Careful: this is an option to Eleventy and not npm, so it needs to live after a --
separator (for instance, npm run build -- --pathprefix=twitter
).⚠️ Warning: 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:
TWITTER_BEARER_TOKEN
environment variable (from the Twitter API v2). Read more about App-only Bearer Tokens.npm run fetch-new-data
@tweetback/canonical
(optional)https://github.com/tweetback/tweetback-canonical has a mapping.js
file that stores the existing twitter username => canonical URL mappings. These will be transformed automatically to point to other archives in all tweetback
instances.