From 06da8e3b7aab82b65791a1821e06cbbe0f0da427 Mon Sep 17 00:00:00 2001 From: jonny7 Date: Tue, 20 Feb 2018 21:13:52 -0400 Subject: [PATCH] LeafRenderer has no member make() Looking through the class, possibly make() has been replaced by render() --- 3.0/docs/leaf/basics.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/3.0/docs/leaf/basics.md b/3.0/docs/leaf/basics.md index a002bfd8..c1cee86d 100644 --- a/3.0/docs/leaf/basics.md +++ b/3.0/docs/leaf/basics.md @@ -13,13 +13,19 @@ Welcome to Leaf. Leaf's goal is to be a simple templating language that can make Once you have Leaf installed, you should create a directory called “Resources” inside your project folder, and inside that create another directory called “Views”. This Resources/Views directory is the default location for Leaf templates, although you can change it if you want. -To render a basic Leaf template from a route, add this code: +Firstly, import Leaf to routes.swift + +```swift +import Leaf +``` + +Then, to render a basic Leaf template from a route, add this code: ```swift router.get { req -> Future in let leaf = try req.make(LeafRenderer.self) let context = [String: String]() - return try leaf.make("home", context) + return try leaf.render("home", context) } ```