# 定期重建HTML

**URL:** https://meta.discourse.org/t/regularly-rebuilding-html/324532
**Category:** Support
**Created:** [2024年九月2日 16:37 UTC](https://meta.discourse.org/t/regularly-rebuilding-html/324532 "2024-09-02T16:37:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [2024年九月2日 16:37 UTC](https://meta.discourse.org/t/regularly-rebuilding-html/324532/1 "2024-09-02T16:37:10Z")

</div>

有没有办法让 Discourse 定期重新渲染帖子中的 HTML？

我注意到很多缩略图预览过一段时间后会失效。许多网站在图片 URL 中使用哈希值，因此当远程网站重建网站或编辑图片时，哈希值会发生变化，导致 Discourse 中的预览失效。

论坛中有 230,000 多个帖子，因此一次性定期重新渲染它们会占用大量服务器资源。理想情况下，可以在后台任务中按固定计划完成。

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2024年九月2日 16:38 UTC](https://meta.discourse.org/t/regularly-rebuilding-html/324532/2 "2024-09-02T16:38:29Z")

</div>

您应该将您的网站设置为下载热链接的图片。

 ![Screenshot_20240902-173851](https://global.discourse-cdn.com/meta/original/4X/1/e/e/1ee46b44690a29731c4239b9be95a525bcdea5a0.png)

然后就不需要重新烘焙了。

---

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [2024年九月2日 16:39 UTC](https://meta.discourse.org/t/regularly-rebuilding-html/324532/3 "2024-09-02T16:39:51Z")

</div>

好的，这应该可以。

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2024年十月2日 16:40 UTC](https://meta.discourse.org/t/regularly-rebuilding-html/324532/4 "2024-10-02T16:40:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
