just_be
Hiya! I'm Justin, I'm an engineer attending the recurse center and live in Brooklyn, NY. I co-host devtools.fm and am interested in the future of personal computing, malleable software, and anything we can build to make folks' lives easier.
Public vals
8
highlight
@just_be
HTTP
Highlight This val exposes and endpoint that you can post code to and get back syntax highlighted
html via Shiki . Shiki does server side highlighting, so it's
perfect for val.town. You can switch themes by providing ?theme=<theme> and specify
the language via ?lang=<language> Example You can play with a working example here . const res = await fetch(`https://just_be-highlight.web.val.run?lang=${lang}&theme=${theme}`, {
method: "POST",
body: code,
});
console.log(await res.text()) Why? I want to add syntax highlighting to my blog soon and I'm
experimenting with what it mean to offload parts of my rendering
to val.town (behind a content-addressible cache, of course).