From 8e3a999efd3c1e3d4893d3265366fdf02c18f7c5 Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Thu, 2 Mar 2023 12:31:15 +0000 Subject: [PATCH] Create cache directory --- src/_data/posts.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/_data/posts.js b/src/_data/posts.js index 9fe46b8..ed57fca 100644 --- a/src/_data/posts.js +++ b/src/_data/posts.js @@ -13,6 +13,10 @@ class PostCache { } readCache() { + if (!fs.existsSync(".cache")) { + fs.mkdirSync(".cache"); + } + if (!fs.existsSync(".cache/wordpress_post_fetch.json")) { this.last_read_date = null; this.posts = {};