# Development

**URL:** https://meta.discourse.org/c/dev/7.md?page=5

[最新版本](https://meta.discourse.org/latest.md) · [分類](https://meta.discourse.org/categories.md) · [標簽](https://meta.discourse.org/tags.md)

**Page:** 6

---

## [Kanban 移动拖放](https://meta.discourse.org/t/kanban-with-mobile-drag-and-drop/390007)

<div class="topic-metadata">

**Author:** [@Drew-ART](https://meta.discourse.org/u/Drew-ART)\
**回覆:** 7\
**Last updated:** [2025年十二月3日 14:11 UTC](https://meta.discourse.org/t/kanban-with-mobile-drag-and-drop/390007 "2025-12-03T14:11:37Z")

</div>

我对期待已久的看板插件的拖放移动功能进行了尝试。我没有发现任何错误，但我还没有进行深入测试。 我认为它非常直观。长按以拾取卡片。滚屏……

---

## [有人创建了自定义Automation吗？](https://meta.discourse.org/t/has-anyone-created-a-custom-automation/275932)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**回覆:** 2\
**Last updated:** [2025年十二月2日 18:56 UTC](https://meta.discourse.org/t/has-anyone-created-a-custom-automation/275932 "2025-12-02T18:56:16Z")

</div>

只是出于好奇，是否有人利用了自定义自动化选项？（创建自定义自动化） 我正在完善说明/指南，如果我能包含一些社区创建的……

---

## [代码风格一致性](https://meta.discourse.org/t/linting-consistency/390104)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 9\
**Last updated:** [2025年十二月2日 18:30 UTC](https://meta.discourse.org/t/linting-consistency/390104 "2025-12-02T18:30:00Z")

</div>

我发誓我已经把 discourse-plugin-skeleton 中的所有 lint 配置都复制到了我的插件中，但当我运行 \`pnpm prettier --write "assets/\*\*/\*.{scss,js,gjs,hbs}"\` 在我的插件目录中时，得到的结果与我运行……时得到的结果不同。

---

## [主题和插件的默认 AGENTS.md](https://meta.discourse.org/t/default-agents-md-for-themes-and-plugins/390102)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 0\
**Last updated:** [2025年十二月1日 21:06 UTC](https://meta.discourse.org/t/default-agents-md-for-themes-and-plugins/390102 "2025-12-01T21:06:15Z")

</div>

我最近读了 https://www.humanlayer.dev/blog/writing-a-good-claude-md?utm\_source=tldrdev，这让我注意到了 https://github.com/discourse/discourse/blob/main/AI-AGENTS.md，这促使我创建了自己的版本……

---

## [仍无法弄清楚如何在第一篇帖子后插入一个 glimmer 组件](https://meta.discourse.org/t/still-cant-figure-out-how-to-insert-a-glimmer-component-after-first-post/390089)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 2\
**Last updated:** [2025年十二月1日 20:13 UTC](https://meta.discourse.org/t/still-cant-figure-out-how-to-insert-a-glimmer-component-after-first-post/390089 "2025-12-01T20:13:11Z")

</div>

继续讨论“在第一篇帖子后插入一个 Glimmer 组件”： 但是现在我的小部件已弃用，我该怎么办？

---

## [静态页面同步：允许同步特定的私有分类](https://meta.discourse.org/t/static-pages-sync-allowing-specific-private-categories-to-be-synced/389676)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**回覆:** 19\
**Last updated:** [2025年十一月29日 14:18 UTC](https://meta.discourse.org/t/static-pages-sync-allowing-specific-private-categories-to-be-synced/389676 "2025-11-29T14:18:44Z")

</div>

这类似于 Contribute \> Feature - Development 主题，不确定应该放在哪个分类下。 有没有办法在插件中修改站点设置？我 99% 确定不行，但只是想确认一下。 如果有的话…

---

## [帖子流即将变更 - 如何准备主题和插件](https://meta.discourse.org/t/upcoming-post-stream-changes-how-to-prepare-themes-and-plugins/372063)

<div class="topic-metadata">

**Author:** [@saquetim](https://meta.discourse.org/u/saquetim)\
**回覆:** 12\
**Last updated:** [2025年十一月27日 19:28 UTC](https://meta.discourse.org/t/upcoming-post-stream-changes-how-to-prepare-themes-and-plugins/372063 "2025-11-27T19:28:36Z")

</div>

我们正在弃用旧的“widget”渲染系统，并用现代的 Glimmer 组件进行替换。 我们最近使用 Glimmer 组件对帖子流进行了现代化改造。本指南将引导您完成 yo… 的迁移

---

## [如何获取用户或“user-api-key”的cookie，而无需用户交互或浏览器重定向？](https://meta.discourse.org/t/how-can-i-obtain-cookies-for-a-user-or-a-user-api-key-without-requiring-user-interaction-or-browser-redirects/389618)

<div class="topic-metadata">

**Author:** [@Alexandre\_Gurgel1](https://meta.discourse.org/u/Alexandre_Gurgel1)\
**回覆:** 3\
**Last updated:** [2025年十一月26日 16:00 UTC](https://meta.discourse.org/t/how-can-i-obtain-cookies-for-a-user-or-a-user-api-key-without-requiring-user-interaction-or-browser-redirects/389618 "2025-11-26T16:00:05Z")

</div>

我目前正在开发一个仅将 Discourse 用作 API 的应用程序。新的功能与私信（DMs）有关，我们正在使用 \`private\_messages\`。这里的问题是我们

---

## [移除 smtp\_should\_reject 和 discourse-smtp-fast-rejection](https://meta.discourse.org/t/remove-smtp-should-reject-discourse-smtp-fast-rejection/389368)

<div class="topic-metadata">

**Author:** [@supermathie](https://meta.discourse.org/u/supermathie)\
**回覆:** 2\
**Last updated:** [2025年十一月25日 15:34 UTC](https://meta.discourse.org/t/remove-smtp-should-reject-discourse-smtp-fast-rejection/389368 "2025-11-25T15:34:06Z")

</div>

继续讨论“处理退信时出现 smtp\_should\_reject “400 bad request” 失败”： 我创建这个主题是为了总结我们进行的一些内部讨论。我们已经确定了 sm……中的代码路径。

---

## [无法运行 rspec 插件测试](https://meta.discourse.org/t/unable-to-run-rspec-tests-for-plugins/389439)

<div class="topic-metadata">

**Author:** [@elmuerte](https://meta.discourse.org/u/elmuerte)\
**回覆:** 2\
**Last updated:** [2025年十一月24日 15:48 UTC](https://meta.discourse.org/t/unable-to-run-rspec-tests-for-plugins/389439 "2025-11-24T15:48:24Z")

</div>

我正在针对稳定版进行开发，但我刚刚发现我再也无法执行后端测试了。不仅我自己的测试，标准插件的测试也无法执行。它们都因相同的原因而出错。 $ bin/rspec plugins/discou……

---

## [更新标准插件的步骤](https://meta.discourse.org/t/procedure-to-update-standard-plugins/389418)

<div class="topic-metadata">

**Author:** [@mcmcclur](https://meta.discourse.org/u/mcmcclur)\
**回覆:** 7\
**Last updated:** [2025年十一月23日 17:18 UTC](https://meta.discourse.org/t/procedure-to-update-standard-plugins/389418 "2025-11-23T17:18:34Z")

</div>

我有一个小型、自托管的 Discourse 站点，是使用标准的 Docker 安装创建的。多年来，我通过编辑 \`containers/app.yml\` 文件末尾的钩子来安装了许多插件，以 \`git clone\` 一个插件……

---

## [基于用户角色/分组的定制CSS](https://meta.discourse.org/t/customized-css-based-on-user-role-groups/281766)

<div class="topic-metadata">

**Author:** [@RBoy](https://meta.discourse.org/u/RBoy)\
**回覆:** 7\
**Last updated:** [2025年十一月22日 15:11 UTC](https://meta.discourse.org/t/customized-css-based-on-user-role-groups/281766 "2025-11-22T15:11:29Z")

</div>

我想弄清楚是否可以根据用户角色或组来定制 CSS？例如，我想在主页上隐藏主题数量统计，我通过添加相对容易地做到了这一点……

---

## [更新帖子ID时出现500内部服务器错误](https://meta.discourse.org/t/500-internal-server-error-when-updating-a-post-by-id/389343)

<div class="topic-metadata">

**Author:** [@nordize](https://meta.discourse.org/u/nordize)\
**回覆:** 1\
**Last updated:** [2025年十一月21日 17:49 UTC](https://meta.discourse.org/t/500-internal-server-error-when-updating-a-post-by-id/389343 "2025-11-21T17:49:40Z")

</div>

我阅读并遵循了 https://meta.discourse.org/t/reverse-engineer-the-discourse-api/20576，发现端点实际上是 \`/posts/{id}\` 而不是 \`/posts/{id}.json\`，但我两者都试过了。 Discourse 运行在……

---

## [存储插件数据有什么最佳方式？](https://meta.discourse.org/t/whats-the-best-way-to-store-data-with-a-plugin/388967)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**回覆:** 12\
**Last updated:** [2025年十一月20日 07:15 UTC](https://meta.discourse.org/t/whats-the-best-way-to-store-data-with-a-plugin/388967 "2025-11-20T07:15:23Z")

</div>

我计划使用一个插件存储数据，该数据只有一个值，即一个主题ID。实现此目的的最佳方法是什么？ 谢谢。

---

## [新用户的userid不是固定的吗？](https://meta.discourse.org/t/userid/388948)

<div class="topic-metadata">

**Author:** [@McDonald\_Louise](https://meta.discourse.org/u/McDonald_Louise)\
**回覆:** 1\
**Last updated:** [2025年十一月19日 09:36 UTC](https://meta.discourse.org/t/userid/388948 "2025-11-19T09:36:13Z")

</div>

遇到集成sso回调后使用 https://connect.linux.do/api/user 获取用户信息遇到同样的username但是userid不一样（都是同一个人），目前分析是新用户userid不固定的问题？

---

## [Discourse 有哪个接口能直接获取某个帖子的最后一条评论信息](https://meta.discourse.org/t/discourse/381511)

<div class="topic-metadata">

**Author:** [@McDonald\_Louise](https://meta.discourse.org/u/McDonald_Louise)\
**回覆:** 7\
**Last updated:** [2025年十一月19日 03:16 UTC](https://meta.discourse.org/t/discourse/381511 "2025-11-19T03:16:33Z")

</div>

我需要有个discourse能直接获取某个帖子的最后一条评论信息只需要指定帖子id楼层不需要指定直接获取最后一条评论信息。有这个接口吗？

---

## [根据帖子内容分配](https://meta.discourse.org/t/assigning-based-on-post-content/387066)

<div class="topic-metadata">

**Author:** [@Anton\_Akhmerov](https://meta.discourse.org/u/Anton_Akhmerov)\
**回覆:** 5\
**Last updated:** [2025年十一月15日 09:26 UTC](https://meta.discourse.org/t/assigning-based-on-post-content/387066 "2025-11-15T09:26:34Z")

</div>

我想使用 Discourse 将用户分配给根据模板化帖子的内容来回答问题。 具体来说，如果学生询问某个问题是如何评分的，我希望该主题被分配给课程团队……

---

## [如何可靠地以编程方式获取 Discourse 的最新版本号？](https://meta.discourse.org/t/how-to-reliably-programmatically-get-the-latest-version-number-of-discourse/388336)

<div class="topic-metadata">

**Author:** [@FelicianoTech](https://meta.discourse.org/u/FelicianoTech)\
**回覆:** 9\
**Last updated:** [2025年十一月14日 23:13 UTC](https://meta.discourse.org/t/how-to-reliably-programmatically-get-the-latest-version-number-of-discourse/388336 "2025-11-14T23:13:58Z")

</div>

正如我可能为许多开源项目所做的那样，我正在寻找 GitHub 发布。有人和我一样，也发现 Discourse（已不再）有 GitHub 发布。 我的下一个尝试是使用 git 标签……

---

## [在编辑器中更改类别时触发函数](https://meta.discourse.org/t/triggering-a-function-whenever-the-category-is-changed-within-the-composer/388497)

<div class="topic-metadata">

**Author:** [@frye\_bradley](https://meta.discourse.org/u/frye_bradley)\
**回覆:** 2\
**Last updated:** [2025年十一月14日 17:55 UTC](https://meta.discourse.org/t/triggering-a-function-whenever-the-category-is-changed-within-the-composer/388497 "2025-11-14T17:55:07Z")

</div>

也许我遗漏了什么显而易见的东西，如果是这样，我提前道歉。 我的插件为每个类别都有自定义设置，用于在编辑器中显示/隐藏切换开关。切换开关是 s…

---

## [JS 无法再用于主题组件](https://meta.discourse.org/t/js-no-longer-works-for-theme-component/388198)

<div class="topic-metadata">

**Author:** [@Turtle](https://meta.discourse.org/u/Turtle)\
**回覆:** 4\
**Last updated:** [2025年十一月14日 11:31 UTC](https://meta.discourse.org/t/js-no-longer-works-for-theme-component/388198 "2025-11-14T11:31:41Z")

</div>

继续从“关于CSS选择器的一点帮助？”的讨论： 你好， 不久前我创建了这个主题，用于根据信任级别生成CSS选择器的JavaScript代码当时是有效的。但现在它不再起作用了。这是相关的JS代码…… …

---

## [开发：符号链接层级过多 - 监视失败](https://meta.discourse.org/t/development-too-many-levels-of-symbolic-links-failed-to-watch/388162)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 6\
**Last updated:** [2025年十一月11日 17:34 UTC](https://meta.discourse.org/t/development-too-many-levels-of-symbolic-links-failed-to-watch/388162 "2025-11-11T17:34:17Z")

</div>

启动时我一直收到此错误 我通过执行此操作来“修复”它： find ~/src/discourse-repos/discourse/plugins/ -type l |xargs rm 只有我这样吗？ 正在启动 CSS 更改监视器 /home/pfaffman/.asdf/installs/ruby/3.3.…

---

## [首次组件尝试。我尝试创建了一个导航按钮高亮器。目前还不能正常工作](https://meta.discourse.org/t/first-component-attempt-ive-had-a-go-at-creating-a-nav-button-highlighter-not-working-as-yet/388090)

<div class="topic-metadata">

**Author:** [@Drew-ART](https://meta.discourse.org/u/Drew-ART)\
**回覆:** 1\
**Last updated:** [2025年十一月11日 05:12 UTC](https://meta.discourse.org/t/first-component-attempt-ive-had-a-go-at-creating-a-nav-button-highlighter-not-working-as-yet/388090 "2025-11-11T05:12:52Z")

</div>

我想将任何导航链接或所有导航链接变成按钮。在我的例子中，这样用户就能看到并想要点击我希望他们点击的链接。 另外，在移动设备上将它们从下拉菜单中移除，因为那在导航方面还可以……

---

## [Discourse的问题跟踪器](https://meta.discourse.org/t/issue-tracker-for-discourse/312354)

<div class="topic-metadata">

**Author:** [@hellekin](https://meta.discourse.org/u/hellekin)\
**回覆:** 13\
**Last updated:** [2025年十一月10日 22:17 UTC](https://meta.discourse.org/t/issue-tracker-for-discourse/312354 "2025-11-10T22:17:25Z")

</div>

继续讨论 Tickets Plugin :tickets:： 我正在寻找一种方法，可以使用类似 Tickets Plugin 的插件，或者将 Forgejo 的问题跟踪器 与 Discourse 集成。也许后者会更容易？ 在回复此主题时，请考虑该想法不是为了提供一次性解决方案，而是为自由软件社区提供一种与 Github 以外的开发工具集成的有趣方法。Forgejo 具有优先权，因为它已成为 Github 和 Gitlab 以外的首…

---

## [如何为我的 markdown 扩展添加富文本编辑器支持？](https://meta.discourse.org/t/how-do-i-add-rich-text-editor-support-to-my-markdown-extension/387753)

<div class="topic-metadata">

**Author:** [@ego-lay\_atman-bay](https://meta.discourse.org/u/ego-lay_atman-bay)\
**回覆:** 5\
**Last updated:** [2025年十一月10日 14:23 UTC](https://meta.discourse.org/t/how-do-i-add-rich-text-editor-support-to-my-markdown-extension/387753 "2025-11-10T14:23:10Z")

</div>

我创建了一个扩展，用于添加一些 bbcode 标签来渲染 snapblocks。当引入富文本编辑器时，这在某种程度上破坏了我的扩展，或者至少在富文本编辑器中无法使用。我想添加上标……

---

## [将 color-input 组件用于非管理员用户](https://meta.discourse.org/t/use-color-input-component-with-non-admin-users/387791)

<div class="topic-metadata">

**Author:** [@pirhoo](https://meta.discourse.org/u/pirhoo)\
**回覆:** 4\
**Last updated:** [2025年十一月7日 15:34 UTC](https://meta.discourse.org/t/use-color-input-component-with-non-admin-users/387791 "2025-11-07T15:34:17Z")

</div>

你好 :waving\_hand: 在我的一款插件中，我想使用 color-input 组件。但是，该组件位于 discourse/admin 文件夹中，因此每当我尝试以非管理员用户的身份导入它时，它都无法被找到……

---

## [为 Collection 添加更多图片 (FormKit)](https://meta.discourse.org/t/add-more-fields-to-collection-formkit/387765)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**回覆:** 1\
**Last updated:** [2025年十一月7日 10:24 UTC](https://meta.discourse.org/t/add-more-fields-to-collection-formkit/387765 "2025-11-07T10:24:59Z")

</div>

我在表单中有以下集合： @tracked formData = { images: \[\] }; ... 添加图片

---

## [Discourse GIFs TC 添加 GIF 时为何不使用 toolbarEvent？](https://meta.discourse.org/t/why-doesnt-discourse-gifs-tc-use-toolbarevent-instead-of-app-event-when-adding-the-gif/387629)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**回覆:** 4\
**Last updated:** [2025年十一月7日 02:30 UTC](https://meta.discourse.org/t/why-doesnt-discourse-gifs-tc-use-toolbarevent-instead-of-app-event-when-adding-the-gif/387629 "2025-11-07T02:30:41Z")

</div>

我昨天在看 gif 的 TC，注意到这段代码： 其中使用了 appEvents 服务。问题是，为什么不能在 action 中传递 toolbarEvent？ 我试过了，似乎可行。还有……

---

## [这是我第一次尝试制作主题](https://meta.discourse.org/t/this-is-my-first-attempt-at-making-a-theme/387772)

<div class="topic-metadata">

**Author:** [@ばこん](https://meta.discourse.org/u/%E3%81%B0%E3%81%93%E3%82%93)\
**回覆:** 5\
**Last updated:** [2025年十一月6日 13:27 UTC](https://meta.discourse.org/t/this-is-my-first-attempt-at-making-a-theme/387772 "2025-11-06T13:27:41Z")

</div>

主题是这样的。 我正在考虑在 GitHub 上发布此内容，但发布这样的内容是否可以？

---

## [无法自定义某些网站文本](https://meta.discourse.org/t/cannot-customize-some-site-texts/387463)

<div class="topic-metadata">

**Author:** [@pangbo](https://meta.discourse.org/u/pangbo)\
**回覆:** 9\
**Last updated:** [2025年十一月6日 10:57 UTC](https://meta.discourse.org/t/cannot-customize-some-site-texts/387463 "2025-11-06T10:57:01Z")

</div>

我正在尝试修改用户偏好设置页面上的某些字符串。我导航到“管理”→“站点文本”并搜索了相关键。但是，我无法自定义我正在寻找的特定文本，因为它……

---

## [利用 discourse 作为常见问题解答来源的聊天支持小部件](https://meta.discourse.org/t/support-chat-widget-that-utilizes-discourse-as-faq-source/387632)

<div class="topic-metadata">

**Author:** [@Nick\_Stager](https://meta.discourse.org/u/Nick_Stager)\
**回覆:** 1\
**Last updated:** [2025年十一月5日 04:43 UTC](https://meta.discourse.org/t/support-chat-widget-that-utilizes-discourse-as-faq-source/387632 "2025-11-05T04:43:46Z")

</div>

我看到了一些关于在 Discourse 论坛上实现 Help Scout 或其他客户支持小部件的帖子，但我想知道是否有人知道类似的客户支持聊天工具，该工具将使用现有的 Discourse 主题来生成建议……

[上一頁](https://meta.discourse.org/c/dev/7.md?page=4)

[下一頁](https://meta.discourse.org/c/dev/7.md?page=6)
