Releases: vapor/leaf
Add experimental support for iOS
This patch was authored by @BeauNouvelle and released by @0xTim.
This change allows Leaf to be used within iOS environments. Without it we get the following error:
The package product 'Vapor' requires minimum platform version 13.0 for the iOS platform, but this target supports 9.0
Fix UnkeyedContainer crash for collections with nil
Export `UnsafeUnescapedLeafTag`
This patch was authored and released by @0xTim.
Exports the new UnsafeUnescapedLeafTag so it's easy to use for anyone importing Leaf
Remove Starting Renderer with Caching Enabled Log
This patch was authored and released by @0xTim.
This removes the log message that states that the application is starting the Leaf Renderer with caching enabled. Because the userInfo is unique per request we can't cache the renderer so it needs to be created for each request (which is fine as everything else is stored in the request's storage). However this means that we get the log for each request.
Additionally the log might not be true if the application is configured to disable caching. Resolves #192
Remove `fatalError()` when using array for `Context`
Extend 'LeafRenderer' so that it can render 'Encodable' contexts
This patch was authored by @glbrntt and released by @0xTim.
Out of the box, the LeafRenderer offers a base API which can render
Leaf templates to a ByteBuffer. This requires the context to be provided
as a dictionary. With ViewRenderer conformance the LeafRenderer can
render View's using an Encodable context.
However, there's no middle ground: the LeafRenderer can't render
templates to a ByteBuffer using an Encodable context. Since
LeafEncoder is internal users can't make the extra hop from Encodable
context to dictionary to use the base API either. This functionality is helpful
when Leaf is used to render documents which aren't HTML.
As such this change adds an extension to LeafRenderer to render a
template to serialized bytes using an Encodable context.
Disable Leaf Cache for the Renderer in development
Leaf 4.0.0
Docs can be found at https://docs.vapor.codes/4.0/leaf/getting-started/
4.0.0 Zeta 1
This release reverses the changes made by Tau. Tau became an awesomely complex and advanced renderer that outgrew Leaf's original view and Vapor. The core team made the decision to release Leaf in it's original form as something we could commit to maintaining and offer a simple HTML renderer. This means that Tau will be split out and offered as a separate renderer for those that want it and Tau won't be constrained by the requirements of the core team. If you want to keep using Tau we encourage you to do so! You can find it in the fork here. Note that the location may change in the future.
This release reflects the final API that will be tagged as 4.0.0 soon unless any glaring bugs come up.
Leaf 4.0.0-tau
tau is the final prerelease of LeafKit 1.0 and Leaf4.
This is a massive rebuild from the previous prerelease version and entirely replaces the architecture for extending the language; as such, there is no direct transition path for converting LeafTag objects to the new architecture directly.
Migration documents are coming soon to address how that functionality has improved and changed
If you currently use the Leaf4 pre-release versions, pin to the final
rcbranch in your Swift Package Manifest to avoid updating to this state if you are not ready to transition:dependencies: [ .package(url: "https://github.com/vapor/leaf-kit.git", .exact("1.0.0-rc.1.17")), .package(url: "https://github.com/vapor/leaf.git", .exact("4.0.0-rc.1.4")) ]
Leaf4 is a dynamic language templating engine for (and inspired by) Swift with a unique hybrid design to allow significant extensibility, customization, performance, and optimizations for a broad range of applications. Leaf templates function primarily as the View component of Model-View-Controller architectures.
As the successor to Leaf3, it greatly expands the language's capabilities and introduces significant changes that are oriented towards: simplfying integration of Leaf into applications; broader use beyond web-templating; robust handling of compiling templates; and improved, more powerful, and safer extensibility of templates at runtime.
LeafKit is the core architecture of Leaf4
Leaf is the bindings of LeafKit to Vapor and Vapor-specific configuration.