You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the skeleton can only render TS templates – which will stay the preferred way of working.
However, certain projects might benefit from other template languages – like Twig or Handlebars – that better connect with the CMS used in a project.
Since we're using express already to render templates "on the server", and @muban/storybook does support server-side template rendering, we could leverage that to basically support any template engine that express supports – and potentially more.
Goals
Be able to render a page, using multiple nested templates
Still allow our current "data" setup for pages, but those are passed to templates
Still allow defining types for the nested template structure, even though it's not used in the TS templates anymore
Add an endpoint to render individual templates "on the server", and configure storybook to load those (instead of the TS templates currently defined in the stories)
The text was updated successfully, but these errors were encountered:
In the MubanWebpackConfig > finalDevServer, make the setupMiddlewares allow for different types of template engines (or abstract it away as "plugins").
Update the MubanPagePlugin > generatePageAssets to (also) output the raw "page data" instead of (only) the rendered HTML, so the middleware above can make use of this data to render the page based on chosen template engine.
Currently running into issues also setting this in compilation.hooks.processAssets.tapPromise
Currently, the skeleton can only render TS templates – which will stay the preferred way of working.
However, certain projects might benefit from other template languages – like Twig or Handlebars – that better connect with the CMS used in a project.
Since we're using
express
already to render templates "on the server", and@muban/storybook
does support server-side template rendering, we could leverage that to basically support any template engine that express supports – and potentially more.Goals
The text was updated successfully, but these errors were encountered: