'How to add github sponsor button to readme

I have github sponsorship enabled through my github repo.

I'm wanting to add a 'sponsor' button into the actual readme.md as well as another website.

Is there some what to add the sponsor button to these type of locations?



Solution 1:[1]

You can use a link or an image like described here.

A link could look like this (with a heart emoji):

[:heart: Sponsor](https://github.com/sponsors/yourGitHubUserName)

An image could be uploaded to the repository or to the user content site (can be done by selecting/dragging a file a file into a text area that is rendered (e.g. files, issues, pull requests, discussions, wikis, ...):

[![Github Sponsorship](img/github_sponsor_btn.svg)](https://github.com/sponsors/yourGitHubUserName)

Solution 2:[2]

shields.io has support for GitHub Sponsors badge. Go to https://shields.io/category/funding to create one.

For example:

![GitHub Sponsor](https://img.shields.io/github/sponsors/<username>?label=Sponsor&logo=GitHub)

Replace <username> with your GitHub username.

would display a badge

enter image description here

If you want to make it clickable:

[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/<username>)

Replace <username> with your GitHub username.

would display a badge

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dan1st
Solution 2