[英]How to use Github buttons in Markdown (README.md)
我想向我的 markdown 添加按钮,当按下时,让查看器分叉、加注星标或观看github 存储库。
我已经尝试将 html 添加到我的 README.md 中,但它不起作用。
尤其
<script async defer src="https://buttons.github.io/buttons.js></script>
似乎不起作用(它只显示链接)
Is there a way to use Github Buttons ( https://buttons.github.io ) in a markdown (.md) file?
还是有其他方法可以实现这一点?
如果您使用按钮创建了图像文件,则可以将其直接合并到 markdown 中。
例如:
[![](https://s18955.pcdn.co/wp-content/uploads/2018/02/github.png)](https://github.com/user/repository/subscription)
要控制按钮的大小,您可能需要合并 html 从这个答案中借用Change 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)
在 Markdown 文件中使用非官方的Github 按钮似乎是不可能的。
但是,您可以使用不同的链接来访问这些操作(降价样式):
[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)
如果有人知道为repo 加注星标的链接,我会将其添加到此答案中:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.