From b0cae7053433cd801b8b0881d4bee1d2b02500bc Mon Sep 17 00:00:00 2001 From: jrtechs Date: Sat, 23 Feb 2019 15:57:59 -0500 Subject: [PATCH] Updated system to embed custom html files in a blog post. --- blog/renderBlogPost.js | 13 + .../html/lets-build-a-genetic-algorithm.html | 485 ++++++++++++++++++ .../lets-build-a-genetic-algorithm.md | 5 + 3 files changed, 503 insertions(+) create mode 100644 blogContent/posts/data-science/html/lets-build-a-genetic-algorithm.html create mode 100644 blogContent/posts/data-science/lets-build-a-genetic-algorithm.md diff --git a/blog/renderBlogPost.js b/blog/renderBlogPost.js index b20178e..eb076b3 100644 --- a/blog/renderBlogPost.js +++ b/blog/renderBlogPost.js @@ -127,6 +127,19 @@ module.exports= } + var regExp = /\/; + while (result.search(regExp) != -1) + { + const pathName = "blogContent/posts/" + categoryURL + "/html/" + + postURL + ".html"; + + var htmlContent = utils.getFileContents(pathName).toString(); + console.log(htmlContent); + + result = result.split("").join(htmlContent); + } + + if(blocks == -1) resolve(result); diff --git a/blogContent/posts/data-science/html/lets-build-a-genetic-algorithm.html b/blogContent/posts/data-science/html/lets-build-a-genetic-algorithm.html new file mode 100644 index 0000000..ec20828 --- /dev/null +++ b/blogContent/posts/data-science/html/lets-build-a-genetic-algorithm.html @@ -0,0 +1,485 @@ + + + +
+
+ + +
+
+
+
+

Population Variables

+
+
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ +
+
\ No newline at end of file diff --git a/blogContent/posts/data-science/lets-build-a-genetic-algorithm.md b/blogContent/posts/data-science/lets-build-a-genetic-algorithm.md new file mode 100644 index 0000000..1bd7563 --- /dev/null +++ b/blogContent/posts/data-science/lets-build-a-genetic-algorithm.md @@ -0,0 +1,5 @@ +# Background + + + +# Set Up \ No newline at end of file