Twitter embedding has been broken for some time, and even when it worked, their control never looked very professional on our website. Also it seems Twitter now blocks users from viewing your feed unless they log in. 😆
This PR introduces a React component that can display our Mastodon feed inside a Docusaurus page.
(I did look around for an existing library, but there aren't a lot of professional grade solutions. The implementation here is very loosely based on https://github.com/sampsyo/emfed/ )
Design goals
Accurately reproduce the basic look & feel of the official Mastodon website in an embedded control
Integrate cleanly with our Docusaurus theme including dark mode
Securely render potentially untrusted server responses, using DOMPurify to scrub the content
Reuse this component on the News page for all Rush Stack website projects
If this experiment is successful, we can eventually generalize the component and publish it to NPM, or contribute it back to an existing project such as emfed.
Twitter embedding has been broken for some time, and even when it worked, their control never looked very professional on our website. Also it seems Twitter now blocks users from viewing your feed unless they log in. 😆
This PR introduces a React component that can display our Mastodon feed inside a Docusaurus page.
(I did look around for an existing library, but there aren't a lot of professional grade solutions. The implementation here is very loosely based on https://github.com/sampsyo/emfed/ )
Design goals
If this experiment is successful, we can eventually generalize the component and publish it to NPM, or contribute it back to an existing project such as
emfed
.Live page
https://rushstack.io/pages/news/
Screenshot