GithubHelp home page GithubHelp logo

nwtgck / gh-card Goto Github PK

View Code? Open in Web Editor NEW
1.3K 10.0 33.0 2.91 MB

:octocat: GitHub Repository Card for Any Web Site

Home Page: https://gh-card.dev

License: MIT License

Dockerfile 2.33% JavaScript 1.58% HTML 1.04% Vue 12.37% TypeScript 82.66%
github card svg png ogp embed repository markdown

gh-card's Introduction

gh-card

CircleCI

GitHub Repository Card for Every Web Site: https://gh-card.dev

Example SVG card

Piping Server static repo card

Demo

gh-card

How it works?

The idea is similar to status badges from Travis CI, CircleCI and etc.

An image URL is like "https://gh-card.dev/repos/nwtgck/piping-server.svg". The request triggers the backend server to call GitHub API request. The repository information are cached currently by Redis.

Related projects

This might be similar to them. The purpose of this project is to provide an image which can be used in every site and the design should be like official GitHub repo card. I hope one day GitHub itself provides this feature officially.

gh-card's People

Contributors

dependabot-preview[bot] avatar freyskeyd avatar kena0ki avatar nwtgck avatar peaceiris avatar tambry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gh-card's Issues

text selection

If <embed> is used instead of <img> the text inside the gh-card is selectable.

<embed src="https://gh-card.dev/repos/mozilla/send.svg?fullname" />

Migrate deprecating GitHub API authentication through query parameters

Maybe, we need to migrate the API authentication in the following lines.

let query = '';
const headers= (() => {
if (this.githubCredential === undefined) {
return {};
} else {
const {githubClientId, githubClientSecret} = this.githubCredential;
const h: {[key: string]: string} = {
// Basic Auth
"Authorization": `Basic: ${Buffer.from(`${githubClientId}:${githubClientSecret}`).toString("base64")}`,
};
query = `?client_id=${githubClientId}&client_secret=${githubClientSecret}`;
return h;
}
})();
const githubRes = await fetch(`https://api.github.com/repos/${repoName}${query}`, {
headers,
});

Getting 502 Error on every request

Similarly to #155, it fails to load the .svg image. However it seems to happen with all repositories, not just some.

I can confirm it was working fine until a few days ago.

Doesn't work for one of my repositories

For some reason, the svg for jrwrigh/ANSYS_CFX doesn't work correctly. On my website, it just sits there and tries to load an image, but it doesn't work and comes up with a broken image.

When trying to create a badge on the website (gh-card.dev), the preview image never loads. Not sure what's going on here, because it was definitely working a few weeks ago. And it works perfectly fine for all my other repositories.

Add link to SVG

Just noticed the SVG text for the repo doesn't have a link to Github. This can be done easily with <a> tags after the 'repo name' comment.

example with my repo:
<a href="https://github.com/trishmapow"> <text xmlns="http://www.w3.org/2000/svg" fill="#0366d6" fill-opacity="1" stroke="none" xml:space="preserve" x="41" y="33" font-family="sans-serif" font-size="16" font-weight="630" font-style="normal">trishmapow/rf-jam-replay</text> </a>

Output (clickable): https://svgshare.com/i/D_M.svg

Seems to not working on some repository

Hello!

I tried to use gh-card on some of my repository but it doesn't work for som of them. (it work for the first one but no more)

the repository is Freyskeyd/instagram

I've no other information sorry :x

proposal: Add example for FaaS

Thank you for migrating to the TypeScript project.

It is might be friendly for users to add some examples to the README.

  1. How to install the backend part (npm install from GitHub...)
  2. How to use the backend part on FaaS like Netlify Functions

IPv6 support

The website lacks IPv6 support.

  • Add 2400:8500:1801:414:118:27:28:243 from v118-27-28-243.q6xl.static.cnode.io as an AAAA record
  • Configure Caddy to listen on IPv6
  • Configure the server for IPv6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.