# 名为 settings 的未初始化变量

**URL:** https://meta.discourse.org/t/uninitialized-variable-named-settings/309192
**Category:** Development
**Tags:** kanban-board
**Created:** [2023年二月17日 04:28 UTC](https://meta.discourse.org/t/uninitialized-variable-named-settings/309192 "2023-02-17T04:28:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jlc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jlc/32/251717_2.png) [@jlc](https://meta.discourse.org/u/jlc)
#### Post date: [2023年二月17日 04:28 UTC](https://meta.discourse.org/t/uninitialized-variable-named-settings/309192/1 "2023-02-17T04:28:27Z")

</div>

我还在学习主题和插件开发，所以有很多我不知道的事情，但我想尽可能为这个主题组件做出贡献。因此，我一直在查看 [Fix board button categories by nathan-nz · Pull Request #23 · discourse/discourse-kanban-theme · GitHub](https://github.com/discourse/discourse-kanban-theme/pull/23) 作为可能的起点。我有一个基本问题：在 [https://github.com/discourse/discourse-kanban-theme/blob/main/javascripts/discourse-kanban/lib/kanban-utilities.js](https://github.com/discourse/discourse-kanban-theme/blob/main/javascripts/discourse-kanban/lib/kanban-utilities.js) 和其他一些地方，有一个未初始化的变量名为 `settings`；它一定是由工具在某个地方设置的，我很想了解更多关于它的工作原理。这是 Ember 的一个功能，还是 Discourse 的主题驱动程序，或者其他什么？是否有关于类似变量的更多文档？

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2023年二月17日 11:24 UTC](https://meta.discourse.org/t/uninitialized-variable-named-settings/309192/2 "2023-02-17T11:24:22Z")

</div>

这是 Discourse 主题的一个功能 - 您可以在此处找到更多信息：

> [@Add settings to your Discourse theme](https://meta.discourse.org/t/add-settings-to-your-discourse-theme/82557):
>
> Discourse has the ability for themes to have “settings” that can be added by theme developers to allow site owners to customize themes through UI without having to change any line of code and worry about losing their changes with future updates for the theme. Themes can also alter certain themeable site settings, for more information on that, see the [Themeable site settings](https://meta.discourse.org/t/-/374376) topic. heavy_plus_sign Adding settings to your theme Adding settings to your theme is a bit different from adding CSS a…
