Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Releases: vapor/template-kit

Support rendering URLs

05 Mar 22:13
4370aa9
Compare
Choose a tag to compare
This patch was authored and released by @tanner0101.

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

TemplateKit 1.4.0

11 Jun 23:28
51405c8
Compare
Choose a tag to compare

New:

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

TemplateKit 1.3.0

08 Jun 18:17
c9ff5f0
Compare
Choose a tag to compare

New:

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

TemplateKit 1.2.0

25 Apr 22:42
121ae51
Compare
Choose a tag to compare

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)

TemplateKit 1.1.2

26 Mar 20:25
4b1073d
Compare
Choose a tag to compare

Fixed:

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

TemplateKit 1.1.1

06 Nov 16:34
aff2d6f
Compare
Choose a tag to compare

Fixed:

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

TemplateKit 1.1.0

08 Aug 18:42
db35b1c
Compare
Choose a tag to compare

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)

TemplateKit 1.0.1

26 Apr 03:01
Compare
Choose a tag to compare

Fixed:

  • Re-added ViewRenderer.

Milestone:
1.0.1

TemplateKit 1.0.0

10 Apr 00:30
Compare
Choose a tag to compare

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.

Template Kit 1.0.0 RC 2.0.1

22 Mar 00:01
ef94038
Compare
Choose a tag to compare
Pre-release

New:

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