Project Scope and ToDos
- Take a link and turn it into an oEmbed/Open Graph style share card
- Take a link and archive it in the most reliable way
- When the link is a tweet, display the tweet but also the whole tweet thread.
- When the link is a tweet, archive the tweets, and display them if the live ones are not available.
- Capture any embedded retweets in the thread. Capture their thread if one exists
- Capture any links in the Tweet
- Create the process as an abstract function that returns the data in a savable way
- Archive links on Archive.org and save the resulting archival links
- Create link IDs that can be used to cache related content
- Integrate it into the site to be able to make context pages here.
- Check if a link is still available at build time and rebuild the block with links to an archived link
- Use v1 Twitter API to get Gifs and videos
Day 14
Ok, let's make sure that the finalized meta object is as filled out as possible.
git commit -am "Fill out finalizedMeta object"
Let's try to embed a tweet and a link in this post! What would this look like for Eleventy? We can't just pull the module in, we'll need to build something to process it.
So first a Tweet in a thread:
This this is the wrong frame, one that has long been maintained by ad tech companies who claim to speak for creators & publishers, but only speak for themselves.
— Aram Zucker-Scharff (@Chronotope) June 9, 2021
Pro-Privacy changes only hurt *because* the marketplaces have been redefined using privacy violating metrics. https://t.co/UxKzt9jqOj
Take a step back.
— Aram Zucker-Scharff (@Chronotope) June 9, 2021
These privacy invasive metrics are not the baseline for marketing success in any marketplace other then digital display, apps and email. Marketing has been successful, small businesses have been successful, in every other venue and period of history.
Marketing and traveling music acts have all found ways to succeed just fine in the past.
— Aram Zucker-Scharff (@Chronotope) June 9, 2021
The normal counter argument here is that the invasive-tracking digital economy supports a larger scale of companies and creatives. But does it? How do we define that exactly?...
See, if you define in scale of businesses. Then sure.
— Aram Zucker-Scharff (@Chronotope) June 9, 2021
But if you define it in share of wealth, seeing as how starting a business is traditionally defined as a path to greater income, it's not so clear, because income inequality has been unstoppable. https://t.co/DmLh65hekh pic.twitter.com/VaN6SC2hel
By redefining marketing as requiring new metrics and invasive tracking, add tech firms sit in the middle, justify themselves, and take revenue from both sides. Their 50-70% share up run invasive tracking is less money to publishers, but also less running advertising for buyers.
— Aram Zucker-Scharff (@Chronotope) June 9, 2021
When we let the ad tech industry's vast swath of data and money stealing middlemen define what metrics are important for marketers, we're letting the cancer define if smoking is good for us.
— Aram Zucker-Scharff (@Chronotope) June 9, 2021
Step back and reconsider, perhaps it's time for new ways to measure and target...
Marketing, like publishing, is for the users. If it works in ways that scare them or make them angry, you've failed before you began.
— Aram Zucker-Scharff (@Chronotope) June 9, 2021
The greatest trick ad tech's vast tracking apparatus ever pulled was convincing marketers they couldn't function w/out paying for vast invasive user tracking. And then just like that, your money is gone and all you've got is a bunch of badly defined badly measured user metrics. pic.twitter.com/3HnzWNqcV7
— Aram Zucker-Scharff (@Chronotope) June 9, 2021
A single tweet:
This is fkin nonsense. Once again: every other browser has already done this. Get rid of the third party cookie. Trying to sue Google to stop this is confused nonsense. https://t.co/UTK0OfeMxg
— Aram Zucker-Scharff (@Chronotope) January 24, 2022
A link:
Let's make your Jekyll site work with Schema.org structured data and JSON-LD.
A tabbed link:
Test for a match, or test for failure, without actually consuming any characters.
Now, let's try building out the Eleventy plugin we need.
The core will be detection, so we want the right regex for it.
There's a good preexisting safe URL regex I can use. But I want to also make sure it's on its own line along with supporting -
, -
and a version that opens with a tab.
So we can play around a little bit to capture the opening and make sure that the URL is the end of the line as well:
const urlRegex =
/^((\t?| )?\- )?(\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))(?=\n|\r)$)+/gim;
Good stuff!
But how to apply it? I've tried doing it inside Markdown before but it requires a double-run. I wonder if I can try another approach?
What about Eleventy transforms? They look pretty straightforward to implement.
Oop ended up going out instead of finishing this. Whelp, on to the next day!