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=".js></script>
does not seem to work (it just displays the link)
Is there a way to use Github Buttons () in a markdown (.md) file?
Or are there other ways to inplement this?
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?
Share Improve this question edited May 12, 2020 at 15:25 publicdomain asked May 12, 2020 at 15:12 publicdomainpublicdomain 1,7224 gold badges24 silver badges39 bronze badges2 Answers
Reset to default 9It 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:
[fork my repository](https://github.com/user/repository/fork)
- Watch/ Follow:
[watch this repo](https://github.com/user/repository/subscription)
- Create Issues:
[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 :)
If you created an image file with the button you could incorporate it directly in markdown.
For example:
[![](https://s18955.pcdn.co/wp-content/uploads/2018/02/github.png)](https://github.com/user/repository/subscription)
To control the size of the button you may need to incorporate html borrowing from this answer Changing image size in Markdown
[<img src="https://s18955.pcdn.co/wp-content/uploads/2018/02/github.png" width="25"/>](https://github.com/user/repository/subscription)