- F/OSS Comics
+ F/OSS Comics
${config.blogName}
diff --git a/src/index.js b/src/index.js
index 0799e20a..7de48791 100644
--- a/src/index.js
+++ b/src/index.js
@@ -4,6 +4,7 @@ const postMethods = require("./posts");
const aboutMethod = require("./about");
const config = require("./config");
const addHomePage = require("./homepage");
+const addListPage = require("./list");
const posts = fs
.readdirSync(config.dev.postsdir)
@@ -17,6 +18,7 @@ if (!fs.existsSync(config.dev.outdir)) fs.mkdirSync(config.dev.outdir);
postMethods.createPosts(posts);
addHomePage(posts);
+addListPage(posts);
// Create about page
const about = aboutMethod.readAbout(config.dev.about);
diff --git a/src/list.js b/src/list.js
new file mode 100644
index 00000000..00728552
--- /dev/null
+++ b/src/list.js
@@ -0,0 +1,65 @@
+const config = require("./config");
+const fs = require("fs");
+
+const listpage = posts => `
+
+
+
+
+
+
+
+
+
+
+
+ All articles
+
+
+
+`;
+
+const addListPage = posts => {
+ fs.writeFile(`${config.dev.outdir}/posts.html`, listpage(posts), e => {
+ if (e) throw e;
+ console.log(`index.html was created successfully`);
+ });
+};
+
+module.exports = addListPage;
diff --git a/src/posts.js b/src/posts.js
index 6289c08e..8c419da7 100644
--- a/src/posts.js
+++ b/src/posts.js
@@ -22,7 +22,7 @@ const posthtml = data => `
${config.blogName}
+
+