How are people generating/creating engines within plugins?

Where plugins use engines are these created in the regular rails way using something like

rails plugin new myplugin --mountable in the discourse root directory?

I have git cloned “discourse-links-category” to see what other people do. Within that plugin I don’t find config/routes.rb. Instead it seems to do the same job with code in plugin.rb.

Do I simply add this engine code into plugin.rb (adjusted for what I want) ?

I use develop using vagrant.

1 Like

Yes that’s all it takes. I’m not familiar with the discourse-links-category plugin. I have spent some time going through the discourse-solved GitHub - discourse/discourse-solved: Allow accepted answers on topics plugin. There is a lot that can be learned from looking at that code. For something really basic you could take a look at this: GitHub - scossar/discourse-blog-post: Adds a blog post class to Discourse

3 Likes

Thanks Simon. I appreciate the pointers on which plugins will be most educational.