使用主题进行后端自定义

大家好,

我想知道是否有人了解是否可以从主题项目中实现像 https://github.com/discourse/discourse-tooltips/blob/master/app/controllers/discourse_tooltips/tooltip_previews_controller.rb 这样的自定义功能。我目前尚未找到相关信息,也不确定是否只能通过插件来实现。

换句话说,我有一个类似 GitHub - discourse/discourse-knowledge-base-theme · GitHub 的项目,我想实现类似 https://github.com/discourse/discourse-tooltips/blob/master/app/controllers/discourse_tooltips/tooltip_previews_controller.rb 的功能。

提前感谢。

是的,这只能通过插件实现。主题通常仅限于修改 Discourse 的前端。

非常感谢你的快速回复 @awesomerobot :heart: