Tagged “javascript”
-
Binding to a JavaScript Function that Returns a Variant in ReScript
javascript indexeddb rescript variantReScript provides easy ways to bind to most JavaScript functions in a way that feels both native and safe. Conveniently, it even provides an
@unwrap
decorator for parametric polymorphism. However, there are a few places where we still have to fill in the gaps. This article documents how to bind to a JavaScript function that can return any one of several different types using ReScript variants.
-
How to Use Excerpts in Eleventy
eleventy javascriptRecently, I added first-paragraph post excerpts to this Eleventy blog's homepage post list. I found it wasn't easy. It wasn't all documented all in one place. Further, in order to use Markdown excerpts in HTML, I had to write a simple custom filter. I'd like to document the process here from end to end.
See all tags.