# 开发 Discourse 插件 - 第 3 部分 - 添加自定义站点设置

**URL:** <https://meta.discourse.org/t/developing-discourse-plugins-part-3-add-custom-site-settings/31115>\
**Category:** Developer Guides\
**Tags:** plugin-guides, tutorial\
**Created:** [2015年七月16日 15:35 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-3-add-custom-site-settings/31115 "2015-07-16T15:35:33Z")\
**Posts on this page:** 1\
**Showing post:** 45

<div class="post-metadata">

**Author:** ![bitmage](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bitmage/32/389881_2.png) [@bitmage](https://meta.discourse.org/u/bitmage)\
**Post date:** [2025年三月15日 18:42 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-3-add-custom-site-settings/31115/45 "2025-03-15T18:42:50Z")

</div>

为了扩展文档：

Site Settings 类型的完整列表可在 [type\_supervisor.rb 代码](https://github.com/discourse/discourse/blob/0ebd0a0bd5e44d3604e89ec47168f1065c6139cb/lib/site_settings/type_supervisor.rb#L32) 中找到。在其正上方，您还可以看到 Site Setting 接受的有效子键。

一个使用更多这些选项的高级示例可以在 [discourse-welcome-link 主题组件](https://github.com/discourse/discourse-welcome-link-banner/blob/c4e78f57e16dd44e916db9b22aedece8fd3a1790/settings.yml#L66) 中找到。这些相同的值也应该可以在插件中使用，但文件将位于 `config/settings.yml`。

---

_[View the full topic](https://meta.discourse.org/t/developing-discourse-plugins-part-3-add-custom-site-settings/31115)._
