Preview and validation
Every template command takes the template folder as an argument and defaults to the current folder, so inside the template you can leave it out.
Preview in the browser
trustisto template start ./my-popupServing ./my-popup on http://localhost:8080/index.html
Press Ctrl+C to stop.The folder is served over HTTP as it is. Open the address in the browser and reload the page after a change. --port picks another port. If the template would not pass validation yet, start still serves it and lists the problems as a warning.
The {{param}} macros are filled in by our script on your client’s website and by the mail pipeline when a mail is sent, so in the local preview they stay as they are. To see the template with the default values from the manifest, open it with the query parameters described in Testing.
Validate
trustisto template validate ./my-popuptemplate validate runs the same checks as the upload in the panel, so you find problems before deploying:
manifest.jsonexists, is valid JSON and matches the manifest schema,- the files the type needs are there:
index.htmlfor every type, plusmanifest.jsonandthumbnail.pngfor a popup or a topbar, index.htmlof a popup or a topbar loads the Trustisto template script,index.htmlof a mail has the{{unsubscribeUrl}}and{{seeInBrowserUrl}}macros (see Mail templates),- the package has at most 100 files and 10 MB.
Each problem is printed on its own line, starting with the file it is in:
manifest.json: params.footer.type must be equal to one of the allowed values
index.html: no {{unsubscribeUrl}} macro, the upload will reject itThe command exits with code 1 when something is wrong, so it can stop a CI pipeline. Deploying runs the same checks first and does not upload an invalid template.