Documentation Index
Fetch the complete documentation index at: https://mintlify.com/maizzle/maizzle.com/llms.txt
Use this file to discover all available pages before exploring further.
Maizzle is fully configured in JavaScript, so you can programmatically set config options or process and make data available to your Templates.
Defining functions
When defining a function, you need to make sure that:
It returns something
Functions must return a value to be used in templates.
You invoke it
Make sure to call the function with () when assigning it to a config key.
import imaginaryLib from 'imaginary-lib'
const foo = function() {
return 'manchu'
}
export default {
foo: foo(), // invoke function defined above
bar: function() {
// do stuff and return
return 'baz'
}(), // invoke function
wha: () => imaginaryLib.render('implicit return 👌')
}
You would access those variables under the page object:
<x-main>
{{ page.foo }}
{{ page.bar }}
{{ page.wha }}
</x-main>
Result:
build_production/example.html
manchu baz implicit return 👌