Giter Club home page Giter Club logo

substitute-stack's Introduction

SubstituteStack - Share Substack links on Twitter/X

In April 2023, Twitter (now X) which had recently been acquired by Elon Musk started fighting. Most of this has been walked back, but a direct link to a substack no longer provides a rich opengraph/card preview and is likely deboosted by the For You algorithm.

This repository contains the backend code for SubstituteStack.com

SubstituteStack fixes this

replace any substack.com url with substitutestack.com

- my-cool-newsletter.substack.com/p/my-cool-post
+ my-cool-newsletter.substitutestack.com/p/my-cool-post

This works with every substack link, whether to a specific post, an about page or to the homepage.

This behaves as a redirect to all services, except the Twitterbot user-agent, in which case it serves an HTML page with the <head> section pulled from substack, which Twitter/X dutifully turns into a rich twitter card.

Avoids writing substack anywhere in the URL

X has in its short history had issues with string replacement, so I've avoided 'substack' appearing in the URL at all, in case it has any effect on the algorithm juice.

Linking best practice

X deboosts tweets containing links heavily, even when using SubstituteStack. The best way to get around this is by posting a screenshot or a tweet without a link, and then replying to it with a link, which creates a thread without the algorithmic penalty.

Hosting yourself

SubstituteStack runs on Cloudflare workers which has a generous free tier. Replacing the DEPLOYMENT_URL in src/index.ts and it should all work, however you'll need a domain name.

Adding a custom domain to your substack directly would be a better path, as it allows for rich previews as well as giving you a home on the web that you control.

substitute-stack's People

Contributors

rmcdgl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.