Does Discourse have custom plugin templates, and how do I write custom plugins?

discourse 有自定义插件模板吗,如何写自定义插件呢

You need to have a Discourse development install. For example, Developing Discourse using a Dev Container

After install it, run

rake plugin:create[your-plugin-name]

It will pull discourse/discourse-plugin-skeleton: Template for Discourse plugins to generate a plugin with the most modern and recommend starting template.

3 Likes

请问dev container 可以作为discourse的开发环境吗

Yes, as linked above:

You can also run a dev env in Guthub Codespaces:

(post deleted by author)

使用github,默认的default 使用快捷键并不生效,还可以在哪里操作呢;pnpm dev 之后端口并没有变成绿色,是为什么呢

Perhaps try selecting the terminal input and then pressing the keys?

If the shortcut keys still aren’t working, I think you may have to run the commands here: