Live data from Hacker News

Show HN: Ray.so – Create images of your code

ray.so

31–40 of 129 posts

Re: Show HN: Ray.so – Create images of your code

#34
If you're looking for this, but with an API, I built https://sourcecodeshots.com to power syntax highlighting and Open Graph images of code for https://essay.dev.

I initially used carbon.now.sh, but they don't have an API, and the community-provided API is pretty slow because it uses a headless browser to generate the image.

Source Code Shots uses VSCode's syntax-highlighting engine, so the highlighting is about as good as you can get and I can fully support a lot of languages that CodeMirror or Highlight.js haven't gotten to.

The docs, https://sourcecodeshots.com/docs, have plenty of examples of how to use it as an API. You can email me at daniel@onegraph.com if there's something you need that it doesn't support.

Re: Show HN: Ray.so – Create images of your code

#35
post #32

Would be awesome if this supported SVG for better accessibility/making code copyable!

Seems like a lot of folks wanna have SVG support. We’ll take a look on how to support it. Do I understand it correctly that this is better to add it to a README?

Re: Show HN: Ray.so – Create images of your code

#36
There is a certain level of straightforwardness that I gravitate towards when it comes to engineering graphics. Purple/Megenta gradients are the 2020 era Stripe/Apple-inspired aesthetic. Obviously, I am an outlier here and I do not want to diminish your efforts the slightest!

Beauty is subjective and I do not resonate with the cliche aesthetic (gradients, flat UI, soft pastel colors, rounded corners). It's a trend and it will come and go. I am inclined towards the timelessness of the International Style, Swiss Graphics, Brutalism, ultra modernist and offensively low-aesthetic-value aesthetics such as: https://git.sr.ht/~sircmpwn/core-go/tree/master/item/server/...

Re: Show HN: Ray.so – Create images of your code

#37
post #28

Earlier quoted context omitted.

Yeah, we wanted to add an API at some point and also provide a deeper integration with Raycast. What would you like to build with the API?

Say I have code snippets I want to include in a Jekyll blog for example. I could call your API from a pipeline process, store the images and link them from the posts. A plugin would be deeper integration, but an API would just work and would be great already. I guess a similar process could work for other blogging platforms.

Love the CI integration. A simple API should allow to build plugins for blogging platforms.
Post reply on HN