

This example will result in the following rendered markup: /js/script.js" /> Then use the hst:webfile tag to refer to any resource in the web file bundle: Freemarker Typically this is done through including a generic "imports" template: Freemarker JSP Refer to Web Files in Templatesįirst make sure the HST tag library is available. The repository-data-webfiles module and the web files inside it should be kept in a version control system along with all the other project source files. In a local development environment, modifying web files on the file system will automatically trigger synchronization of the modified web files in the repository and reload affected pages that are open in a web browser. When starting the application the web files are bootstrapped in the content repository at /webfiles/site.

The web files are organized by type in corresponding subfolders of site, such as css, js, fonts and freemarker. In a standard project the site's web file bundle is stored in the repository-data-webfiles module in the src/main/resources/site folder: repository-data/webfiles/src/main/resources/site Web files are identified by a path relative to the bundle’s root directory (e.g. Directories can be used to organize web files hierarchically.

"site" for the the site.war application). A web file bundle consists of files and directories. The name of the used bundle is the same as the web application context (e.g. The default configuration will be fine in most cases, however if you have specific needs see the following pages:Įach web application can make use of its own web file bundle. Other (older) projects can be upgraded to web files as part of the upgrade to Hippo 10. Projects created from the Maven archetype are already set up for web files. This page explains how to use web files in your Hippo project: where to store web files, how to reference web files in a template, and how to store templates as web files. Web Files are static web resources (such as CSS and Javascript files, and Freemarker templates) which are stored in the content repository. Refer to web files in templates, and store Freemarker templates as web files.
