From f4bb9b96ed6d73ae93a6abdab6ef356cee6dfee6 Mon Sep 17 00:00:00 2001 From: Tim Condon <0xTim@users.noreply.github.com> Date: Sat, 12 Dec 2020 17:45:57 +0000 Subject: [PATCH] Add note about custom working directory in Leaf's configure section --- 4.0/docs/leaf/getting-started.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/4.0/docs/leaf/getting-started.md b/4.0/docs/leaf/getting-started.md index e434a07d..a44cb5fb 100644 --- a/4.0/docs/leaf/getting-started.md +++ b/4.0/docs/leaf/getting-started.md @@ -43,6 +43,8 @@ This tells Vapor to use the `LeafRenderer` when you call `req.view` in your code > **Note:** Leaf has an internal cache for renderering pages. When the `Application`'s environment is set to `.development`, this cache is disabled, so that changes to templates take effect immediately. In `.production` and all other environments, the cache is enabled by default; any changes made to templates will not take effect until the application is restarted. +!!!warning For Leaf to be able to find the templates when running from Xcode, you must set the [custom working directory](https://docs.vapor.codes/4.0/xcode/#custom-working-directory) for you Xcode workspace. + ## Folder Structure Once you have configured Leaf, you will need to ensure you have a `Views` folder to store your `.leaf` files in. By default, Leaf expects the views folder to be a `./Resources/Views` relative to your project's root.