An open API service indexing awesome lists of open source software.

https://github.com/mpclarkson/vapor-stencil

Stencil view renderer for Vapor
https://github.com/mpclarkson/vapor-stencil

Last synced: 6 months ago
JSON representation

Stencil view renderer for Vapor

Awesome Lists containing this project

README

        

# Vapor Stencil

Vapor `RenderDriver` implementation for [Stencil](https://github.com/kylef/Stencil).

## Installation

To add `VaporStencil`, add the following package to your `Package.swift`.

`Package.swift`
```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`
```swift
import VaporStencil

//set the stencil renderer
//for all .stencil files
View.renderers[".stencil"] = StencilRenderer()
```