🚦 State: Production ready
Plain and simple:
adapters:
html: @uiengine/adapter-htmlWith options:
adapters:
html:
module: @uiengine/adapter-html
options:
basedir: ./src/components
debug: trueThe basedir option allows for referencing includes with an absolute path.
In addition to that there is the option debug for a more detailed output in case of rendering errors.
You can reference variables with the JavaScript template literal syntax:
<div>${myData.variable}</div>Given the context { myData: { variable: 'Test' } } this would render like
<div>Test</div>You can include other html templates/components using the SSI include command:
<body>
<!--#include file="header.html" -->
<div>main content</div>
<!--#include file="footer.html" -->
</body>Variables and includes can also be combined:
<body>
<!--#include file="${myIncludeFile}" -->
</body>