From e13c5726846a89df4196f6abc9fc98d99d48305b Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 18 Jun 2017 18:23:28 +0200 Subject: Rename templates to njk It's specified in the nunjucks documentation. Using it allows editors to understand the syntax better --- src/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index fce4c09..242b298 100644 --- a/src/index.js +++ b/src/index.js @@ -13,7 +13,11 @@ const view = require('koa-nunjucks-next') const Posts = require('./modules/posts.js') const posts = Posts.getFolder(process.env.POST_DIR) -app.use(view(`${__dirname}/views`)) +app.use( + view(`${__dirname}/views`, { + extname: 'njk' + }) +) const postsArray = Array.from(posts.entries()) router.get('/', async function (ctx) { -- cgit 1.4.1