docsify-mustache / docsify-mustache.github.io

A Docsify plugin that allow preprocessing markdown documents with Mustache template engine.
https://docsify-mustache.github.io
MIT License
16 stars 6 forks source link

Maths in the frontend matter #11

Open markbattistella opened 3 years ago

markbattistella commented 3 years ago

Part of Mustache is being able to do some basic maths in the variables: https://mustache.github.io/mustache.5.html

{
  "value": 10000,
  "taxed_value": 10000 - (10000 * 0.4),
}

It would be great to be able to do this in the docsify too, or as seen in other uses of Mustache to be able to reference variables itself:

{
  "value": 10000,
  "taxed_value": this.value - (this.value * 0.4)
}