mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-24 22:46:57 +02:00
feat(v2): enhance @docusaurus/plugin-content-blog (#1311)
* feat(v2): @docusaurus/plugin-content-blog * address code review
This commit is contained in:
parent
bd0cdbc701
commit
4bd5d3937e
11 changed files with 156 additions and 55 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue