diff options
| author | Ben Beltran <ben@nsovocal.com> | 2020-06-03 07:40:42 +0200 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2020-06-03 07:40:42 +0200 |
| commit | 5f31ea34aea76b8357913abd003bddb0f47f4dab (patch) | |
| tree | 37efcdbc86caca0fbd4864926e7a6deb16952ed5 /lib/blog.js | |
| parent | db7b464d701c7d48777ddd38a10f69093cd5442c (diff) | |
Add TXT support
Diffstat (limited to 'lib/blog.js')
| -rw-r--r-- | lib/blog.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/blog.js b/lib/blog.js index 98efabd..541d6b3 100644 --- a/lib/blog.js +++ b/lib/blog.js @@ -9,6 +9,7 @@ const { debuglog, promisify } = require('util'); const StaticGenerator = require('./generators/static'); const HTMLGenerator = require('./generators/html'); const RSSGenerator = require('./generators/rss'); +const TXTGenerator = require('./generators/txt'); const internals = { @@ -108,6 +109,7 @@ module.exports = class Blog { await StaticGenerator(this.postsDirectory, this.staticDirectory, posts); await HTMLGenerator(this.templatesDirectory, this.staticDirectory, posts); await RSSGenerator(this.templatesDirectory, this.staticDirectory, posts); + await TXTGenerator(this.templatesDirectory, this.staticDirectory, posts); } // Reads the posts into an array @@ -134,7 +136,8 @@ module.exports = class Blog { internals.debuglog('Parsing markdown'); posts.push({ ...metadata, - html: Marked(postContent) + html: Marked(postContent), + raw: postContent }); } catch (error) { |