Readme

Content Transform Plugin#

A Lesstruct plugin that transforms content before it is saved by uppercasing the title.

Prerequisites#

Build#

1
tinygo build -o content-transform.wasm -target=wasi main.go

Install#

Copy the compiled WASM file to the Lesstruct plugins directory:

1
cp content-transform.wasm <lesstruct-project>/plugins/

Expected Behavior#

When content is saved, the plugin intercepts the before_save hook and uppercases the "title" field value. For example:

  • Input: {"title":"my blog post", "content":"..."}
  • Output: {"title":"MY BLOG POST", "content":"..."}