Context path

Sometimes your site not directly hosted on the root level, let’s assume it runs under /foo (e.g.

When setting the contextPath value in the gram extension the template and preview task take this into account.

gram {
  contextPath = "/foo"

In Thymeleaf th:href=@{/bar} will result in href="/foo/bar".

The preview task will serve everything under /foo