Vapor RenderDriver
implementation for Stencil.
To add VaporStencil
, add the following package to your Package.swift
.
Package.swift
.Package(url: "https://github.com/tannernelson/vapor-stencil.git", majorVersion: 0)
Then set the StencilRenderer()
on your View.renderers
for whatever file extensions you would like to be rendered as Stencil
templates.
main.swift
import VaporStencil
//set the stencil renderer
//for all .stencil files
View.renderers[".stencil"] = StencilRenderer()