From a28d599a3a4f0ef4e391ac03bc7e3ccf23dc1074 Mon Sep 17 00:00:00 2001 From: jrtechs Date: Wed, 12 Dec 2018 12:58:43 -0500 Subject: [PATCH] Fixed static content loader dealing with json and javascript files. --- includes/html/header.html | 2 +- includes/img/favicon/{site.webmanifest => site.json} | 0 includes/staticContentServer.js | 10 +++++++++- 3 files changed, 10 insertions(+), 2 deletions(-) rename includes/img/favicon/{site.webmanifest => site.json} (100%) diff --git a/includes/html/header.html b/includes/html/header.html index 6f0024d..2bbe33e 100644 --- a/includes/html/header.html +++ b/includes/html/header.html @@ -22,7 +22,7 @@ - + diff --git a/includes/img/favicon/site.webmanifest b/includes/img/favicon/site.json similarity index 100% rename from includes/img/favicon/site.webmanifest rename to includes/img/favicon/site.json diff --git a/includes/staticContentServer.js b/includes/staticContentServer.js index 05a38d6..ea5ec07 100644 --- a/includes/staticContentServer.js +++ b/includes/staticContentServer.js @@ -32,10 +32,18 @@ module.exports= includes.sendCSS(result, baseURL + filename); return true; } + else if (filename.includes(".json")) + { + if(filename.includes("includes/") || filename.includes("blogContent")) + { + includes.sendHTML(result, baseURL + filename); + return true; + } + } //scripts else if (filename.includes(".js")) { - if(baseURL.includes("includes/") || baseURL.includes("blogContent")) + if(filename.includes("includes/") || filename.includes("blogContent")) { includes.sendJS(result, baseURL + filename); return true;