diff options
-rw-r--r-- | src/index.js | 6 | ||||
-rw-r--r-- | src/views/index.njk (renamed from src/views/index.html) | 0 | ||||
-rw-r--r-- | src/views/post.njk (renamed from src/views/post.html) | 0 | ||||
-rw-r--r-- | src/views/tag.njk (renamed from src/views/tag.html) | 0 |
4 files changed, 5 insertions, 1 deletions
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) { diff --git a/src/views/index.html b/src/views/index.njk index dcc142c..dcc142c 100644 --- a/src/views/index.html +++ b/src/views/index.njk diff --git a/src/views/post.html b/src/views/post.njk index 81f7e3d..81f7e3d 100644 --- a/src/views/post.html +++ b/src/views/post.njk diff --git a/src/views/tag.html b/src/views/tag.njk index 7ff9871..7ff9871 100644 --- a/src/views/tag.html +++ b/src/views/tag.njk |