Sorry if this has been asked, I tried searching for documentations but all I can find is the Get Started post, it helped me create a plugin but it didn’t cover topics such as what APIs are available. So, are there documents at all?
Thanks!
Sorry if this has been asked, I tried searching for documentations but all I can find is the Get Started post, it helped me create a plugin but it didn’t cover topics such as what APIs are available. So, are there documents at all?
Thanks!
Api documentation is available at
http://docs.discourse.org
Discourse API doc is not what I’m requesting. I was thinking about something like Chrome plugin development docs or WordPress plugin development docs. For example when I read the Beginner’s Guide to Creating Discourse Plugins, I have questions like what are other special properties and callbacks does Discourse recognize in the default module? or what parameters are passed into the initialize() method? Neither the guide nor docs.discourse.org answered those questions.
As discourse uses ember in frontend and rails in backend, you can browse their respective docs to know how to create components, or controllers, etc.
That being said, you can go through the code of discourse to learn how they are doing things.
I had asked similar question long time back… See if the answers given here help you.
Then those questions are probably good candidates for dev ![]()
给这个话题顶一下,因为还没得到回复 ![]()
@bcartwri96 我觉得归根结底,Discourse 插件 API 缺乏全面的文档。
Meta 上有一些零散的信息,例如 https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-1/30515/1,但似乎没有完整的 API 参考。虽然其中部分内容属于标准的 Ember 或 Rails 范畴,但中间仍有大量内容纯属 Discourse 的约定俗成。
长远来看,如果社区能够着手编写一本 Discourse 开发者手册来填补这一空白,那将非常有益。我们已在 Pavilion 上实践了一些片段式的操作指南(HOWTOs),希望这些工作能为开发更全面的参考指南奠定初步基础。
查看这个文件。大部分方法都有简要的文档说明
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/lib/plugin-api.js