如何配置 Netlify CMS 将博客存储在不同的文件夹下而不是直接在项目根目录下

How to config Netlify CMS to store blogs under a different folder rather than directly under project root

我正在使用 Netlify + Netlify CMS + Gatsby 来做我的博客。

我开始看到越来越多的 reduxcacheXXXXX 文件夹出现在项目根文件夹中。

如果我不需要它们,我该如何删除它们并防止这些文件夹再次出现?

它们是自 Gatsby 2.19 以来出现的缓存文件。似乎他们在尝试在每个构建中删除(并重命名)它们时遇到权限问题,如此 GitHub thread

在这里您可以找到关于 data storage with Redux in Gatsby 及其使用方法的详细文档:

During Gatsby’s bootstrap & build phases, the state is stored and manipulated using the Redux library. The key purpose of using Redux in Gatsby internals is to centralize all of the state logic. Reviewing the Gatsby reducers and actions folders gives a comprehensive picture of what state manipulations are possible.

澄清一下不是使用Netlify的问题。所有 CMS 都会发生这种情况(我有一个 Contentful 和 DatoCMS 自己的项目并且仍在发生)。

回答您的问题,"bug" 似乎仍然存在。您应该忽略这些文件并在看到它们后立即将其删除。另外,你可以尝试将你的Gatsby包更新到最新的稳定版本。