gpt4 book ai didi

javascript - 如何在 Markdown 中使用 Github 按钮 (README.md)

转载 作者:行者123 更新时间:2023-12-04 11:59:07 26 4
gpt4 key购买 nike

我想在我的 Markdown 中添加按钮,当按下时,让查看器 叉、星或 watch 一个 github 存储库。

我已经尝试将 html 添加到我的 README.md 中,但它不起作用。

尤其

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

似乎不起作用(它只显示链接)

有没有办法在 Markdown (.md)文件中使用 Github 按钮( https://buttons.github.io )?

还是有其他方法可以实现这一点?

最佳答案

如果您使用按钮创建了图像文件,则可以将其直接合并到 markdown 中。
例如:

[![](https://s18955.pcdn.co/wp-content/uploads/2018/02/github.png)](https://github.com/user/repository/subscription)
要控制按钮的大小,您可能需要合并从这个答案中借用的 html 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)

关于javascript - 如何在 Markdown 中使用 Github 按钮 (README.md),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61755287/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com