]> git.maquefel.me Git - brevno-suite/hugo/commit
Add build time math rendering
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 7 Aug 2024 08:40:54 +0000 (10:40 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 9 Aug 2024 15:18:37 +0000 (17:18 +0200)
commit33c0938cd50dd3409f8e94878b97d789cc328f23
treefc4cc45265b86746aa37bc3ab4445724d22a98f2
parent0c3a1c7288032401327a9c4d7044e297bf3f7da6
Add build time math rendering

While very useful on its own (and combined with the passthrough render hooks), this also serves as a proof of concept of using WASI (WebAssembly System Interface) modules in Hugo.

This will be marked _experimental_ in the documentation. Not because it will be removed or changed in a dramatic way, but we need to think a little more how to best set up/configure similar services, define where these WASM files gets stored, maybe we can allow user provided WASM files plugins via Hugo Modules mounts etc.

See these issues for more context:

* https://github.com/gohugoio/hugo/issues/12736
* https://github.com/gohugoio/hugo/issues/12737

See #11927
26 files changed:
cache/filecache/filecache_config.go
cache/filecache/filecache_config_test.go
common/hugio/writers.go
deps/deps.go
go.mod
go.sum
hugolib/site_new.go
internal/warpc/build.sh [new file with mode: 0755]
internal/warpc/gen/main.go [new file with mode: 0644]
internal/warpc/js/.gitignore [new file with mode: 0644]
internal/warpc/js/common.js [new file with mode: 0644]
internal/warpc/js/greet.bundle.js [new file with mode: 0644]
internal/warpc/js/greet.js [new file with mode: 0644]
internal/warpc/js/package.json [new file with mode: 0644]
internal/warpc/js/renderkatex.bundle.js [new file with mode: 0644]
internal/warpc/js/renderkatex.js [new file with mode: 0644]
internal/warpc/katex.go [new file with mode: 0644]
internal/warpc/warpc.go [new file with mode: 0644]
internal/warpc/warpc_test.go [new file with mode: 0644]
internal/warpc/wasm/greet.wasm [new file with mode: 0644]
internal/warpc/wasm/quickjs.wasm [new file with mode: 0644]
internal/warpc/wasm/renderkatex.wasm [new file with mode: 0644]
internal/warpc/watchtestscripts.sh [new file with mode: 0755]
tpl/transform/transform.go
tpl/transform/transform_integration_test.go
tpl/transform/unmarshal.go