javascripthtmlgithubmarkdown

How to use Github buttons in Markdown (README.md)


I want to add buttons to my markdown that, when pressed, let the viewer fork, star or watch a github repository.

I already tried adding the html to my README.md, but it does not work.

Especially

<script async defer src="https://buttons.github.io/buttons.js></script>

does not seem to work (it just displays the link)

Is there a way to use Github Buttons (https://buttons.github.io) in a markdown (.md) file?

Or are there other ways to inplement this?


Solution

  • It seems impossible to use the unofficial Github Buttons in a Markdown file.

    However, you can use different links to access those actions (markdown style):

    [fork my repository](https://github.com/user/repository/fork)

    [watch this repo](https://github.com/user/repository/subscription)

    [create issue](https://github.com/user/repository/issues/new)

    If somebody knows a link to star a repo, I will add that to this answer :)