-
Notifications
You must be signed in to change notification settings - Fork 266
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automated logo rendering/visualization #696
Comments
I am very excited for this new feature 馃槂
Vercel seems like a good choice (nice UI, good integration w/ GH).
What if we had a
Generating the whole HTML content per request sounds fine to me. Performance isn't paramount for this feature IMO.
I am not sure I got this one. I thought the serverless function could be sufficient by directly returning the html content in its body with a Content-Type set to 'text/html'. But, I've never tried it, so I could be wrong. |
Here's a simple example of a Vercel app with an API (it's basically only an API 馃槅)
|
Oh, also, if onefetch is getting a domain do we want to set up a |
Good point, but if it's just for the domain name, that won't be necessary.
This may be too intrusive IMO. If we wish to have this code live in the onefetch repo, its footprint should be kept to a bare minimum which is why I liked the idea of a serverless function. |
Good points. TBH I'm thinking making the language definitions JSON might be best, much like how tokei does it. Besides making our language definitions easily readable by a variety of tools, it should make it easier to contribute. Many GitHub users already know JSON, and they won't need to learn our specific macro format. Switching to JSON can be a separate PR from setting up Vercel.
I've never actually needed to use a |
I'm sold 馃憤 and we could go one step further and put the ascii logos in there too. As such we would have in a single file all the languages' metadata, allowing us to remove the And yes this should be done first and preferably in a separate PR. |
馃 If ascii will be contained in the data file, then perhaps it should be YAML. That has more readable multi-line strings. |
Dev Notes / Some more thing to consider
|
馃帀 onefetch.dev 馃帀 |
Summary 馃挕
Started the conversation here, but my comment was unrelated enough that it should have been a new issue.
Basic idea is that we could have a solution to automate previews of the logos. This can probably be done with a serverless function.
Some things to consider:
Should it exist in a different repo?(we probably want it in the same repo to listen for changes and be able to import the latest change from the main onefetch project)api/language[/:name]
.Also if we just generate the HTML once, we can actually just use GH Pages instead of a serverless tool. But one thing I've liked about Vercel is that it creates preview builds for PRs (see motivation).
Motivation 馃敠
When reviewing PRs, currently we have to pull down the PR's changes and rebuild the binary to review any added or changed logos. This can be greatly simplified by making previews that are automatically generated, which can allow maintainers to review the logo even if they're not at their main device.
The text was updated successfully, but these errors were encountered: