Skip to content

Commit bb06237

Browse files
committed
Fix twitter.com icon
1 parent c386e70 commit bb06237

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Take ownership of your Twitter data. First talked about at [Jamstack Conf 2019](https://www.zachleat.com/web/own-your-content/) and in [this blog post](https://www.zachleat.com/web/own-my-tweets/).
44

5+
* _Referenced on [Delete Twitter](https://deletetwitter.com/)!_
6+
57
## Demos
68

79
* https://www.zachleat.com/twitter/

eleventy.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ module.exports = function(eleventyConfig) {
1616
});
1717

1818
eleventyConfig.addJavaScriptFunction("avatarUrl", function avatarUrl(url) {
19+
if(url.startsWith("https://twitter.com/")) {
20+
url = "https://x.com/" + url.slice("https://twitter.com/".length);
21+
}
1922
return `https://v1.indieweb-avatar.11ty.dev/${encodeURIComponent(url)}/`;
2023
});
2124

0 commit comments

Comments
 (0)