Coder Social home page Coder Social logo

sponsors's Introduction

sponsors

Using https://github.com/antfu/sponsorkit

Usage

pnpm i

pnpm gen

Serving the SVG

The gist.sh script uses GitHub gist as a static file host. Go to https://gist.github.com and create a public gist. Give any description and create a sponsors.svg file with <svg></svg> as the content (temporary only). Click on the embed button, change to Clone via SSH, and take note of the SSH URL.

Update the .env file with the SSH URL:

SPONSORS_GIST=<ssh_url>

Make sure there's an existing sponsorkit/sponsors.svg file locally before continuing to the next step.

To update the sponsors.svg file of the gist, run pnpm gist. It will create a temporary gist folder, copy over the sponsors.svg file, and force push to the remote gist to ensure only one commit exists.

Now you can access the SVG file with a URL like https://gist.github.com/user/gist_id/raw/sponsors.svg. Serving directly from this endpoint is not ideal as GitHub doesn't send the proper Content-Type, for me I've set a custom proxy to acheive so. There are options like http://raw.githack.com but it's Cache-Control is too long.

Note: The guide has the following assumptions:

  1. You have set up SSH. See GitHub docs.
  2. The default git branch is master.

Sponsors

Sponsors

License

MIT

sponsors's People

Contributors

bluwy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.