随着我写的帖子越来越多,鹈鹕花的时间越来越长。它是否也在重新制作旧帖子?

pelican taking longer and longer as I write more and more posts.. is it re-making the old posts too?

您好,我开始使用 pelican 静态站点生成器,但我注意到,它在制作 html 时花费了越来越多的时间,因为我继续写越来越多 posts ,

是否也重新制作旧的 post?他们是我可以制作 html 并且只制作新的 post 来添加到现有的吗?

是否也重新制作旧的 post?

是的,确实如此! 事实上,据说每次都写入文件比比较、保存和生成哈希要快得多,也可靠得多。来自鹈鹕常见问题解答:

In order to reliably determine whether the HTML output is different before writing it, a large part of the generation environment including the template contexts, imported plugins, etc. would have to be saved and compared, at least in the form of a hash (which would require special handling of unhashable types), because of all the possible combinations of plugins, pagination, etc. which may change in many different ways. This would require a lot more processing time and memory and storage space. Simply writing the files each time is a lot faster and a lot more reliable.

阅读"Why does Pelican always write all HTML files even with content caching enabled?"

是他们的任何我可以制作 html 并且只制作新的 post 以添加到现有的吗?

在设置中设置 WRITE_SELECTED 列表时,您只能指定要写入的 select 内容。因此只有那些文件会被写入。 也可以使用 --write-selected 选项在命令行上指定此列表,该选项接受以逗号分隔的输出文件路径列表。默认情况下,此列表为空,因此写入所有输出。

阅读:"Writing only selected content"