This application integrates with Storybook Server renderer and can render Freemarker templates or Thymeleaf templates with the args from Storybook.
Caution
This application should never be deployed in production! An attacker can use this application to render any content on your domain.
You need to create a configuration file: XP_HOME/config/no.item.storybook.cfg with the following content:
iAmNotFoolishEnoughToDeployThisInProduction=true
xpResourcesDirPath=/home/ubuntu/code/my-xp-project/src/main/resources
renderMode=freemarker
Config key | Value |
---|---|
iAmNotFoolishEnoughToDeployThisInProduction |
You will set this to true to indicate that you understand that this must never be deployed on a server open to the internet. |
xpResourcesDirPath |
The resources directory in your XP-project. This can also be a comma separated string with multiple resource directories (Freemarker only). |
renderMode (optional) |
If the template language can not be determined by the file extension or renderMode query parameter, this fallback value will be used. Legal options are: freemarker or thymeleaf |
Install the application from Enonic Market.
You will find information on how to set up your project in the xp-storybook-utils documentation.
To build the project run the following code
enonic project build
Deploy locally for testing purposes:
enonic project deploy
./gradlew publish -P com.enonic.xp.app.production=true