Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
github-buttons
Advanced tools
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
Get started quickly with github:button configurator.
The source code for the configurator is available at ntkme/github-buttons-app.
import { render } from 'github-buttons'
// export function render(anchor: HTMLAnchorElement, callback: (el: HTMLElement) => void): void;
render(anchor, function (el) {
anchor.parentNode.replaceChild(el, anchor)
})
// export function render(options: object, callback: (el: HTMLElement) => void): void;
render(options, function (el) {
document.body.appendChild(el)
})
These options are the same for all the use cases described above:
Attribute | Description |
---|---|
href | GitHub link for the button. |
title | title attribute for the button's <iframe> . |
data-icon | octicon-mark-github by default. A subset of Octicons is bundled. |
data-size | None by default or large . |
data-show-count | false by default or true . The dynamic count is generated based on detected button type. |
data-text | Text displayed on the button. It defaults to the text content within the link. |
aria-label | Aira label for the button link. |
Button type is detected from href
.
https://github.com/:user
(follow)https://github.com/:user/:repo
(star)https://github.com/:user/:repo/subscription
(watch)https://github.com/:user/:repo/fork
(fork)https://github.com/:user/:repo/issues
(issues)https://github.com/:user/:repo/issues/new
(issues)Tailing slash, query string, and hash in the href
won't affect type detection.
https://github.com/:user/
(follow)https://github.com/:user?tab=repositories
(follow)https://github.com/:user/:repo#readme
(star)https://github.com/:user/:repo/#readme
(star)git clone https://github.com/ntkme/github-buttons.git
cd github-buttons && npm install
npm run build
npm test
See LICENSE.
FAQs
GitHub Buttons
The npm package github-buttons receives a total of 31,473 weekly downloads. As such, github-buttons popularity was classified as popular.
We found that github-buttons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.