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!
The discussion centers on the lack of comprehensive documentation for Discourse’s Plugin API. a9udn9u initially asks for API docs beyond the basic Get Started guide, noting that existing resources like docs.discourse.org and the Beginner’s Guide don’t explain plugin-specific properties, callbacks, or method parameters like those in Chrome or WordPress plugin docs. net_deamon suggests consulting Ember and Rails docs or browsing Discourse’s source code, referencing a prior thread for context. erlend_sh encourages such questions to be posted in Development. bcartwri96 bumps the thread for visibility. pacharanero confirms the scarcity of official Plugin API docs, noting that while some conventions are Ember/Rails-based, much is unique to Discourse. They suggest community collaboration to build a Discourse Developer Manual, pointing to early efforts at thepavilion.io. fzngagan and alxndr direct users to the plugin-api.gjs file in the Discourse repo, which contains brief inline documentation for available methods — now located at blob/main/app/assets/javascripts/discourse/app/lib/plugin-api.gjs. The consensus is that developers must currently rely on source code, community posts, and fragmented guides.
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
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 Development ![]()
Je remonte ce sujet car il n’a pas reçu de réponse ![]()
@bcartwri96 Je pense que, en résumé, il existe très peu de documentation complète sur l’API des plugins de Discourse.
On trouve des éléments d’information ici sur Meta, comme Developing Discourse Plugins - Part 1 - Create a basic plugin, mais il semble qu’il n’existe aucune référence API exhaustive. Bien que certaines parties relèvent simplement d’Ember ou de Rails, il y a une énorme quantité de choses intermédiaires qui sont de pures conventions Discourse.
À terme, il serait souhaitable que la communauté puisse travailler sur un Manuel du développeur Discourse pour combler ce vide. Nous avons déjà mis cela en pratique sous forme de fragments de guides pratiques sur Pavilion, et espérons que ce travail constitue les fondations initiales pour élaborer un guide de référence plus complet.
Consultez ce fichier. La plupart des méthodes sont brièvement documentées
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/lib/plugin-api.js
Ce fichier a été déplacé vers blob/main/app/assets/javascripts/discourse/app/lib/plugin-api.gjs