Template Kit Versions Save

? Easy-to-use foundation for building powerful templating languages in Swift.

1.5.0

4 years ago
This patch was authored and released by @tanner0101.

Adds support for serializing URLs in templates (#38, fixes #64).

1.4.0

4 years ago

New:

  • Adds a new init method DateFormat(defaultDateFormatterFactory: () -> DateFormatter) (#45)
  • Adds a new static DateFormat.iso8601 tag that uses ISO-8601 formatting (#45)

1.3.0

4 years ago

New:

  • Performance improvements to HTML string escaping (#56)
  • New String.htmlEscaped() method (#56)

1.2.0

5 years ago

New:

  • TemplateDataEncoder has been refactored for improved performance. (#50)
  • DateFormatters are now cached during rendering for improved performance. (#51)

Fixed:

  • DateFormat now returns null when arguments are null. (#44)
  • Context userInfo does now get passed to nested scopes. (#53, #54)
  • Using #for on null array now returns null. (#55)

1.1.2

5 years ago

Fixed:

  • Fixed an issue with UnsafeBufferPointer in Swift 5. (#46)

1.1.1

5 years ago

Fixed:

  • userInfo is now correctly passed when using #embed. (#41, #42)

1.1.0

5 years ago

New:

  • Performance improvements for files loaded from disk. (#24)
  • ViewRenderer now supports passing a userInfo dictionary that will be accessible by TagRenderers. (#17, #28)
return req.view().render("welcome", ["name": "Vapor"], userInfo: ["foo": "bar"])
final class FooTag: TagRenderer {
    func render(_ tag: TagContext) -> ... { 
        print(tag.context.userInfo["foo"])
    }
}

Fixed:

  • Fixed issue which could cause incorrect views to be returned from cache. (#26, #25, #31).
  • Fixed LeafDataEncoder to properly recognize custom encoding methods. (#29, #20, #30).
  • Fixed #date tag crasher. (#23)

1.0.1

6 years ago

Fixed:

  • Re-added ViewRenderer.

Milestone: 1.0.1

1.0.0

6 years ago

Introducing Template Kit 1.0 ? Template Kit is an easy-to-use foundation for building powerful templating languages in Swift.

Docs: https://docs.vapor.codes/3.0/template-kit/getting-started/

API Docs: https://api.vapor.codes/template-kit/latest/TemplateKit

Milestone: 1.0.0


Changes since final release candidate:

Fixed:

  • Audited and internalized several APIs to minimize API surface.
  • Removed TemplateData.future case in favor of TagRenderers returning Future<TemplateData> (was redundant previously).
  • Added lots of missing doc blocks, now at 100% docs coverage.

1.0.0-rc.2.0.1

6 years ago

New:

  • Adds isFirst and isLast variables alongside index while using iterators.