# 如何替换/覆盖主页模板

**URL:** <https://meta.discourse.org/t/how-to-replace-override-homepage-template/381697>\
**Category:** Support\
**Created:** [2025年九月5日 10:06 UTC](https://meta.discourse.org/t/how-to-replace-override-homepage-template/381697 "2025-09-05T10:06:59Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![saish](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saish/32/539116_2.png) [@saish](https://meta.discourse.org/u/saish)\
**Post date:** [2025年九月5日 10:06 UTC](https://meta.discourse.org/t/how-to-replace-override-homepage-template/381697/1 "2025-09-05T10:06:59Z")

</div>

我想为已登录和未登录用户配置不同的自定义主页。虽然我知道这可以通过 JavaScript 实现，但我有兴趣了解是否也可以通过 Discourse 组件或插件来实现。

我遇到了组件 [User-specific Discourse home page](https://meta.discourse.org/t/custom-homepage-for-groups/199623)，该组件允许创建新路由并添加模板，但我更希望不采用该方法。

如果有什么替代建议或推荐的最佳实践，我将非常感谢您的指导。

---

_[View the full topic](https://meta.discourse.org/t/how-to-replace-override-homepage-template/381697)._
