-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace embedded tweets #3869
Merged
Merged
Replace embedded tweets #3869
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"0ce81ce23a2491fe0e6fe7a76d2d95":"1"},{"cachedAt":1718212425058,"type":"2"},"json"] | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/stroupaloop/status/593525508945489921","author_name":"Andrew Stroup 최영호","author_url":"https://twitter.com/stroupaloop","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Some <a href=\"https://twitter.com/WhiteHouse?ref_src=twsrc%5Etfw\">@WhiteHouse</a> Pres Innov Fellows on policing data at moveForward(100) / @whitehouseostp talks <a href=\"https://twitter.com/18F?ref_src=twsrc%5Etfw\">@18F</a> <a href=\"https://twitter.com/USGSA?ref_src=twsrc%5Etfw\">@usgsa</a> <a href=\"https://twitter.com/hashtag/govlife?src=hash&ref_src=twsrc%5Etfw\">#govlife</a> <a href=\"http://t.co/QTqfMmbhFs\">pic.twitter.com/QTqfMmbhFs</a></p>— Andrew Stroup 최영호 (@stroupaloop) <a href=\"https://twitter.com/stroupaloop/status/593525508945489921?ref_src=twsrc%5Etfw\">April 29, 2015</a></blockquote>\n<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"2c6b74860b54324c210492f60eb9ea":"1"},{"cachedAt":1718212425287,"type":"2"},"json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/seldo/status/571453200093437952","author_name":"Laurie Voss","author_url":"https://twitter.com/seldo","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Does your project pass the Bechdel test? To pass, a function written by a woman dev must call a function written by another woman dev.</p>— Laurie Voss (@seldo) <a href=\"https://twitter.com/seldo/status/571453200093437952?ref_src=twsrc%5Etfw\">February 27, 2015</a></blockquote>\n<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"3175d7d5aed9c093038d0739895aae":"1"},{"cachedAt":1718212425878,"type":"2"},"json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/enBloomMedia/status/519288750640480256","author_name":"Alisa Hughley, MPH","author_url":"https://twitter.com/enBloomMedia","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Thank to the folks <a href=\"https://twitter.com/18F?ref_src=twsrc%5Etfw\">@18F</a> and <a href=\"https://twitter.com/hhsidealab?ref_src=twsrc%5Etfw\">@HHSIDEALab</a> for moving the <a href=\"https://twitter.com/hashtag/opensource?src=hash&ref_src=twsrc%5Etfw\">#opensource</a> code of <a href=\"https://twitter.com/hashtag/Midas?src=hash&ref_src=twsrc%5Etfw\">#Midas</a> forward; learned lots</p>— Alisa Hughley, MPH (@enBloomMedia) <a href=\"https://twitter.com/enBloomMedia/status/519288750640480256?ref_src=twsrc%5Etfw\">October 7, 2014</a></blockquote>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"41198981b42daba837eedfada4b325":"1"},{"cachedAt":1718212425579,"type":"2"},"json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/monfresh/status/519297925965684736","author_name":"Moncef Belyamani","author_url":"https://twitter.com/monfresh","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Had a great time at the <a href=\"https://twitter.com/18F?ref_src=twsrc%5Etfw\">@18F</a> hack night. Sent a PR to update installation instructions and fixed 2 bugs that <a href=\"https://twitter.com/saikofish?ref_src=twsrc%5Etfw\">@saikofish</a> found.</p>— Moncef Belyamani (@monfresh) <a href=\"https://twitter.com/monfresh/status/519297925965684736?ref_src=twsrc%5Etfw\">October 7, 2014</a></blockquote>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"4df3809831b720bb2338122a0a9fe7":"1"},{"cachedAt":1718212425574,"type":"2"},"json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/corizarek/status/593525117210103809","author_name":"Cori Zarek","author_url":"https://twitter.com/corizarek","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">The <a href=\"https://twitter.com/hashtag/digitalservices?src=hash&ref_src=twsrc%5Etfw\">#digitalservices</a> teams in the USG are AMAZING. Awesome demos today from <a href=\"https://twitter.com/18F?ref_src=twsrc%5Etfw\">@18F</a>, PIFs + <a href=\"https://twitter.com/USDS?ref_src=twsrc%5Etfw\">@USDS</a> at <a href=\"https://twitter.com/hashtag/moveforward100?src=hash&ref_src=twsrc%5Etfw\">#moveforward100</a> <a href=\"http://t.co/2oZ491TUP2\">pic.twitter.com/2oZ491TUP2</a></p>— Cori Zarek (@corizarek) <a href=\"https://twitter.com/corizarek/status/593525117210103809?ref_src=twsrc%5Etfw\">April 29, 2015</a></blockquote>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"90d45473fd48f14202bed6b586de4c":"1"},{"cachedAt":1718212425880,"type":"2"},"json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/thebenedict/status/578572813155590144","author_name":"Michael Benedict","author_url":"https://twitter.com/thebenedict","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\"><a href=\"https://twitter.com/18F?ref_src=twsrc%5Etfw\">@18F</a> Picture in tweet: screenshot of a tweet featuring a screenshot of a reply to a tweet featuring an image. <a href=\"http://t.co/PWUIJgubPd\">pic.twitter.com/PWUIJgubPd</a></p>— Michael Benedict (@thebenedict) <a href=\"https://twitter.com/thebenedict/status/578572813155590144?ref_src=twsrc%5Etfw\">March 19, 2015</a></blockquote>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"ac76c6912caf31b4258aca47327ad3":"1"},{"cachedAt":1718212425042,"type":"2"},"json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/travelingheidi/status/578569906834264064","author_name":"Heidi Tandy (my tweets are not legal advice) 💫","author_url":"https://twitter.com/travelingheidi","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\"><a href=\"https://twitter.com/18F?ref_src=twsrc%5Etfw\">@18F</a> Since it doesn't work the same way in all apps, or if one goes back to earlier tweet days/months later can you link to earlier tweet.</p>— Heidi Tandy (my tweets are not legal advice) 💫 (@travelingheidi) <a href=\"https://twitter.com/travelingheidi/status/578569906834264064?ref_src=twsrc%5Etfw\">March 19, 2015</a></blockquote>\n<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"c01364da60e21e17b304ecad867be6":"1"},{"cachedAt":1718212426138,"type":"2"},"json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/VLVarin/status/519229900516233216","author_name":"Vanessa Varin","author_url":"https://twitter.com/VLVarin","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">It's like CSI, but for <a href=\"https://twitter.com/hashtag/ux?src=hash&ref_src=twsrc%5Etfw\">#ux</a> <a href=\"https://twitter.com/18F?ref_src=twsrc%5Etfw\">@18F</a> <a href=\"http://t.co/ZjltngriZ1\">pic.twitter.com/ZjltngriZ1</a></p>— Vanessa Varin (@VLVarin) <a href=\"https://twitter.com/VLVarin/status/519229900516233216?ref_src=twsrc%5Etfw\">October 6, 2014</a></blockquote>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"c456ffb390e7d85d92cd6382ae9f7e":"1"},{"cachedAt":1718212425877,"type":"2"},"json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/USGSA/status/593540092871970817","author_name":"GSA","author_url":"https://twitter.com/USGSA","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">The <a href=\"https://twitter.com/USDS?ref_src=twsrc%5Etfw\">@USDS</a> and <a href=\"https://twitter.com/18F?ref_src=twsrc%5Etfw\">@18F</a> teams saying hi to <a href=\"https://twitter.com/DeniseUSGSA?ref_src=twsrc%5Etfw\">@DeniseUSGSA</a> at the <a href=\"https://twitter.com/hashtag/moveForward100?src=hash&ref_src=twsrc%5Etfw\">#moveForward100</a> event. <a href=\"http://t.co/uncSFpyaEH\">pic.twitter.com/uncSFpyaEH</a></p>— GSA (@USGSA) <a href=\"https://twitter.com/USGSA/status/593540092871970817?ref_src=twsrc%5Etfw\">April 29, 2015</a></blockquote>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"c8be41e4b1a77adf6efb6dfe0dec48":"1"},{"cachedAt":1718212425055,"type":"2"},"json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/18F/status/519227871311953920","author_name":"18F","author_url":"https://twitter.com/18F","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">The daytime <a href=\"https://twitter.com/hashtag/hackathon?src=hash&ref_src=twsrc%5Etfw\">#hackathon</a> crew at work! Looking forward to what comes out of today's Midas hack: <a href=\"https://t.co/PYjHVwuJHu\">https://t.co/PYjHVwuJHu</a> <a href=\"http://t.co/OE273Sil0Z\">pic.twitter.com/OE273Sil0Z</a></p>— 18F (@18F) <a href=\"https://twitter.com/18F/status/519227871311953920?ref_src=twsrc%5Etfw\">October 6, 2014</a></blockquote>\n<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"d29afdc5b25f847b412eb8708bd171":"1"},{"cachedAt":1718212425569,"type":"2"},"json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url":"https://twitter.com/kimberlymunoz/status/578571119164264449","author_name":"Kimberly Muñoz","author_url":"https://twitter.com/kimberlymunoz","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\"><a href=\"https://twitter.com/18F?ref_src=twsrc%5Etfw\">@18F</a> Would creating another account @18FImages to link + reply to tweets with descriptions be an option? It allows folks to turn it on/off.</p>— Kimberly Muñoz (@kimberlymunoz) <a href=\"https://twitter.com/kimberlymunoz/status/578571119164264449?ref_src=twsrc%5Etfw\">March 19, 2015</a></blockquote>\n\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https://twitter.com","version":"1.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what the
.cache
is for, can you please clarify?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! The cache is preventing the site from pinging the Twitter to fetch the data every time we run a build. It stores all the tweet request/response data, and I've set it to cache permanently, so once we have the tweet, we should never need an external connection to get it again.
This is also going to save us a lot of ZScaler headaches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK! Sensible, but does that necessarily follow that we have to update the cache ourselves? Or is the
.cache
a directory we can git ignore going forward and trust that the build has the updated data?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, I'm thinking we don't need to see the updated twitter feed ourselves while doing local dev?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither of those questions squares with my understanding of how this caching works, so let me try to explain my understanding and get us on the same page.
About four of our blog posts embed tweets in them, as part of the narrative of the post. Here's a good example.
To get these tweets, we have to interact with one of the Twitter APIs. Previously this was done through an oembed gem. It doesn't look like that gem had any caching, so I think every time you ran
jekyll build
it hit the network and re-requested the tweet data.The 11ty twitter plugin fetches tweets in blog posts one time, then caches the network data, then uses that cached data in the templates. There's no need for additional network requests to request a resource that's, for our purposes, immutable. Moncef isn't going to update his tweet from 2014 about a hack night. (I'd be open to reducing the cache length to 1 year or 6 months, though, to account for the possibility of account deletion.)
Let's say we add a new blog post that embeds a few tweets. When the person adding that post builds the site, it will request the new tweets, cache the data, and that's it — it's part of the blog, no need for anyone else to have to make the same requests.
Keeping the cache in the repo solves a lot of problems; .
gitignore
ing the cache creates headaches:git clone
sudo
permissions or local certsIf we .gitignore the .cache then every new contributor and every CI build will have to re-download the tweet data and deal with zscaler; by keeping the cache, we can avoid all of this.
And if new contributors all have to fetch the tweet data, it means a lot more of this kind of exchange:
I suspect the permissions to temporarily disable zscaler may be revoked at some point, so I'd like the design of the solution here to minimize that workaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. Yes, I misunderstood the usage of the embed plugin -- this is for explicitly embedded tweets in posts. SGTM