diff --git a/scripts/blog.js b/scripts/blog.js index ae8cd69..0e351f7 100644 --- a/scripts/blog.js +++ b/scripts/blog.js @@ -1,45 +1,50 @@ let converter = new showdown.Converter(); -$.getJSON("blog/posts.json", function (json) { - let list = $('#blog-list'); - for (let i = json.length - 1; i >= 0; i--) { - var obj = json[i]; - let id = obj["id"]; +$.ajax({ + dataType: "json", + url: "blog/posts.json", + cache: false, + success: function (json) { + let list = $('#blog-list'); + for (let i = json.length - 1; i >= 0; i--) { + var obj = json[i]; + let id = obj["id"]; - let p = ""; - p += ''; - p += '