feat(v2): enhance @docusaurus/plugin-content-blog (#1311)

* feat(v2): @docusaurus/plugin-content-blog

* address code review
This commit is contained in:
Endilie Yacop Sucipto 2019-03-26 01:39:58 +07:00 committed by GitHub
parent bd0cdbc701
commit 4bd5d3937e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 156 additions and 55 deletions

View file

@ -14,6 +14,7 @@ const genCache = new Map();
async function generate(generatedFilesDir, file, content) {
const cached = genCache.get(file);
if (cached !== content) {
await fs.ensureDir(generatedFilesDir);
await fs.writeFile(path.join(generatedFilesDir, file), content);
genCache.set(file, content);
}