英文:
How to make dynamic github badges, that is, images in README which change state?
问题
如何在GitHub的README中添加一个动态的“徽章”?所谓的“徽章”,是指。
即使在GitHub的README中放置一个URL,该URL映射到返回svg/png的服务器,它如何在GitHub的README页面上自动更新?
举个例子,如果你访问这个链接,你会看到问题的更新状态(已关闭),但是我的GitHub README页面仍然显示过时的徽章,即显示问题仍然是打开的。
有没有一个示例服务器代码(比如用golang),可以动态地渲染GitHub的徽章?
英文:
How do you add a "badge" in GitHub README so that it is dynamic? By "badge", I mean
The question is even if one puts a URL in GitHub README which maps to a server returning an svg/png, how does it update automatically on GitHub README page?
As an example if you visit the link
, you'd see the updated status of the issue (which is closed), but my GitHub README page still shows outdated badge, that is, shows the issue being open.
What is an example server code (say in golang) which can render github badges dynamically?
答案1
得分: 3
这只是一个位于URL上的图片。由服务器(你的例子看起来像是Jenkins)决定提供什么样的图片。
英文:
It's just an image at a URL. It's up to the server (your example looks like Jenkins) to decide what image to provide.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论