插件 API 版本

Where do I find which versions of discourse support which plugin api version. Currently I am using pluginapi v 0.8 because I found it in discourse theme guide. But I haven’t been able to locate plugin api versions and their link with discourse versions.

3 个赞

@Usman_Shahid

Not sure if this is the best way, but perhaps you can look at the plugin-api.js file (line 89) where the version number is listed:

const PLUGIN_API_VERSION = “0.12.3”

and compare that number across different commits of Discourse?

1 个赞

Thank you that’s very helpful

1 个赞

看起来我当前版本(3.2.0)的文件在这里:

这是查找我们应该使用的 API 版本的一种非常晦涩的方式。

根据我目前的经验,如果你弄错了,脚本会静默失败而无法加载。