From 1c30f95677f9635e2847f7a6e111d57cee102371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GOUIN?= Date: Wed, 19 Jun 2019 16:33:14 +0200 Subject: [PATCH] [skip ci]wip file_walker reading article info --- sample_data/article/index.md | 2 +- src/file_walker.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sample_data/article/index.md b/sample_data/article/index.md index 8212cc1..e45f07a 100644 --- a/sample_data/article/index.md +++ b/sample_data/article/index.md @@ -2,5 +2,5 @@ ## If you see this page, that means it's working -![missing image](./birthday-cake.png) +![thumbnail](./birthday-cake.png) diff --git a/src/file_walker.js b/src/file_walker.js index 134a170..2d2c9ad 100644 --- a/src/file_walker.js +++ b/src/file_walker.js @@ -26,9 +26,14 @@ const fileTree = (path, cb) => { }); }; +const readIndexFile = (path,cb) => { + //TODO reading page title and possibly ![thumbnail](url) +}; + module.exports = (config) => { return { fileTree: config['test'] ? fileTree : undefined, + readIndexFile: config['test'] ? readIndexFile : undefined, fetchArticles: (cb) => { fileTree(config['data_dir'], (err, fileList) => { if (err)