Anyone created a Discourse theme?

Hey I’m just booting up discourse now and looking at making a theme. Has anybody done that before? Any tips and tricks?

From how most Discourse forums look the same, I think it’s an untapped skill :smiley:

1 Like

1 Like

Jeez discourse is a bit of a mind bend. Takes 4-5 min to rebuild it every time you want to test a plugin/theme change. Slowly getting my head around it.

1 Like

Yikes! Good to know how tricky it can be.

This time is going to be heavily affected by how you are running discourse. For example, if you are using vagrant across a shared filesystem there is a pretty good chance you are going to hit disk performance issues unless you’ve configured the share to use the correct amount of resources/watcher process to run the VM efficiently. Out of the box, discourse also doesn’t ship with a boot preloader (like spring) configured which will only reload the files you touch instead of the whole environment so you’ll be spending a fair amount of your time getting the environment loaded again.

If you’d like to explain a little more about how you’ve got it setup, I’d be happy to give you some pointers on speeding this up.

1 Like

Cheers! I’ve got the load time down quite a bit by changing the vagrant config to use NFS file sharing.

Originally I was incorrectly using the discourse docker image for dev work (which had the 4min rebuild) instead of vagrant. Apparently it is possible to use docker for discourse dev work, however the discourse docker image is designed for production and not dev, hence my issues :slight_smile:

Discourse running in vagrant lets me make changes and simply refresh the browser to see them. It takes about 20 seconds to refresh the page after a change, but after that it runs nice and fast.

Others have run into this issue and the only fix is to skip vagrant and run it all locally. That seems to fix everyones slow discourse dev problems.

This ruby and ES6 is all brand new to me so I’m limping through it in my free time :slight_smile: I’ll give it another crack tonight.