-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Badge Maker #236
Comments
Hello! 👋 Thanks for opening this issue. We appreciate your feedback and will look into it as soon as possible. Feel free to add more details if necessary. |
I want to work on this . |
I using a third party api here , Is that okay? |
Yes, you will use an external library. I would recommend using this cool library: https://www.npmjs.com/package/badge-maker |
no I meant an api , not a library .
…On Mon, Aug 5, 2024 at 9:05 PM Adam Basha ***@***.***> wrote:
Hello:)
My idea is to enable users to create custom badges for there repos.
There will be an api like /api/badge/ and it will take prams to customize
the badge. Then there will be a tool where you can generate the url and get
a preview.
I want to work on this .
Hello:)
My idea is to enable users to create custom badges for there repos.
There will be an api like /api/badge/ and it will take prams to customize
the badge. Then there will be a tool where you can generate the url and get
a preview.
I using a third party api here , Is that okay?
Yes, you will use an external library. I would recommend using this cool
library: https://www.npmjs.com/package/badge-maker
—
Reply to this email directly, view it on GitHub
<#236 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A32P4C35KFBIWP273CXMHQDZP6LTLAVCNFSM6AAAAABLZYS5TGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRZGM3DANJRHA>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
like the badgen.net |
No, you will be building the api from scratch using next js |
Is there any image storage for this project . I need server to store this images so that they can be used in the readme file |
There is no server. It will be an api that you will build that will generate the badge |
This an example of the api. https://github.com/EddieHubCommunity/HealthCheck/blob/main/src/app/api/badges/report/%5Bid%5D/route.js |
github doesn't allow Include an SVG (hosted on GitHub) in MarkDown When this question was asked (in 2012) SVGs didn't work. Since then Github has implemented various improvements. Now (at least for SVG), the correct Content-Type headers are sent. The easiest way to add SVG is to use the upload assets feature. To quote the manual: You can upload assets like images by dragging and dropping, selecting from a file browser, or pasting. You can upload assets to issues, pull requests, comments, and .md files in your repository. Since 2022, "images" also includes SVG: Some comments regarding changes that happened along the way: Github has implemented a feature which makes it possible for SVG's to be used with the Markdown image syntax. The SVG image will be sanitized and displayed with the correct HTTP header. Certain tags (like <script>) are removed. To view the sanitized SVG or to achieve this effect from other places (i.e. from markdown files not hosted in repos on http://github.com/) simply append ?sanitize=true to the SVG's raw URL. I copied the SVG image from the question to a repo on github in order to create the examples below Linking to files using relative paths (Works, but obviously only on github.com / github.io) Result See the working example on github.com. Linking to RAW files Result Linking to RAW files using ?sanitize=true Result Linking to files hosted on github.io Result Answer from Potherca on Stack Overflow |
what I can do is , I can store the image in the public folder inside the Nextjs application |
The image will not be hosted on github. It will be generated in the api. and then we can embed it. We won't be storing anything |
no it doesn't support the image in the base64 version , we need to store it somewhere like all the badge-makers do |
It won't be base64. it will be a url like this: https://repo-rater.eddiehub.org/rate?owner=EddieHubCommunity&name=RepoRater. This is an api not a base64. If you feel this is to complicated i can help you build the api. |
yeah , I got it , when I send a request to a file like this it should
generate the image , right ? So that we can paste it to the readme.md .
Unfortunately the github only support the rendering of image that are
hosted somewhere .
…On Wed, Aug 7, 2024 at 2:12 PM Adam Basha ***@***.***> wrote:
no it doesn't support the image in the base64 version , we need to store
it somewhere like all the badge-makers do
It won't be base64. it will be a url like this:
https://repo-rater.eddiehub.org/rate?owner=EddieHubCommunity&name=RepoRater.
This is an api not a base64.
If you feel this is to complicated i can help you build the api.
—
Reply to this email directly, view it on GitHub
<#236 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A32P4C3IA3YLJABHFYY3V5LZQHMYBAVCNFSM6AAAAABLZYS5TGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSHE2DCMRYGE>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
|
can you please comment the code that you pasted in the readme.md to view the badge . |
Here:
|
Yes, the badge markdown is structured this way because the badge image is hosted on the https://repo-rater.eddiehub.org server. The URL https://repo-rater.eddiehub.org/api/badge?owner=EddieHubCommunity&name=RepoRater is used to dynamically generate and retrieve the badge image. The markdown format: markdown : This part generates the badge image using the provided URL. |
Yes, this is what we want |
Hello:)
My idea is to enable users to create custom badges for there repos.
There will be an api like
/api/badge/
and it will take prams to customize the badge. Then there will be a tool where you can generate the url and get a preview.The text was updated successfully, but these errors were encountered: