From d33f5f82a72cb795380a10fdc4d30427dc17488c Mon Sep 17 00:00:00 2001 From: Nicholas Carrigan Date: Thu, 24 Sep 2020 07:10:29 -0700 Subject: [PATCH] fix(learn): Consistent Styling in `Set up a Template Engine` (#39657) * Replace bold with code * Typo * Apply suggested verbiage change. Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> * remove code tags from render Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> --- .../set-up-a-template-engine.english.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.english.md b/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.english.md index 7193d27493..9d95efa05e 100644 --- a/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.english.md +++ b/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.english.md @@ -15,9 +15,9 @@ A template engine enables you to use static template files (such as those writte To set up Pug for use in your project, you will need to add it as a dependency in your package.json. Don't forget to add the name of the package and the version. Use the package.json for some examples of the correct syntax. -Express needs to know which template engine you are using. We will use the set method to assign 'pug' as the 'view engine'. app.set('view engine', 'pug') +Express needs to know which template engine you are using. We will use the set method to assign pug as the view engine property's value: app.set('view engine', 'pug') -Your page will not load until you correctly render the index file in our 'views/pug' directory. +Your page will not load until you correctly render the index file in the views/pug directory. You should change the response for the / route to use res.render(). This method takes a string of a file path as an argument. The path can be a relative path (relative to views), or an absolute path, and does not require a file extension.