Theme Support? Can't find files
-
Hi there I would like to implement themes for Wekan but can't seem to find where I would do that, the file manager on Cloudron only gives access to one blank file and I can't seem to track it down via SFTP. Is there a way to modify files, or upload theme files / plugins somehow via this Cloudron instance of wekan?
-
@adamaragon Are you referring to https://github.com/wekan/wekan/wiki/Custom-CSS-themes ? It seems all the files are part of the upstream code itself and not meant to be user modifiable.
Depending on the use case, you can do two things:
-
Build a custom package. The package code is at https://git.cloudron.io/cloudron/wekan-app and you can build it using these instructions
-
Alternately, put the app in Repair mode (under Repair section of the app). Then open web terminal and you can edit the files. The files are under /app/code. Then when modified. You can start Wekan using
/app/code/start.sh
. Note changes do not "presist" this way but you can use this approach to develop the theme.
-
-
Thank you @girish for the reply, I'm not super skilled at doing my own build and while I can do the CSS there are plenty of existing themes that I like already that I'd be happy to implement as-is. Is there a way to find a package that just already includes a new theme or a simpler way to accomplish this?
-
@adamaragon If I understand correctly, you are asking how to implement a new theme and not how to use an existing theme. If you want to use an existing theme, then you just Select Board -> Board Settings -> Change Color.
For making a new theme, you have to setup a development environment for wekan since it involves editing code files. If you are looking for a persistent way to keep your custom code/theme changes, then there is no way than to build a custom wekan package. This is because code on Cloudron is read-only and if we let people edit the files, it will break updates. Building a custom package is quite easy, if you want to go down the route - https://forum.cloudron.io/topic/3102/building-custom-packages
If you want to just have a dev Wekan environment and the goal is to submit a PR to the upstream project, you can do it like this on Cloudron:
- Install wekan. Best not to use your production instance.
- Install the CLI tool -
sudo npm install -g cloudron
on your laptop (and not on the server) cloudron debug --app mywekan.domain.com
. This command will place your app in "debug" mode. In debug mode, you can edit all the files you want. Note that this does not start the app itself, just puts the files in a editable filesystem. At this point, you won't be able to access Wekan in the browser since the app is not running.- You can now use Cloudron's File manager to edit the files. All the wekan code is in /app/code
- In the CLI, you can
cloudron exec --app wekan.example.com
. This gives you a shell into the app's file system. You can edit the files here too inside /app/code. It's the same as the UI above. - Once you have edited it, you have to run
/app/code/start.sh
(using the exec terminal above). This will start the app and you can also access Wekan in your browser now. To stop the app, ctrl+c.
Once you have made changes, I guess you have to submit a PR to upstream Wekan project so they can include it.
Finally, you can remove the debug mode using
cloudron debug --disable --app mywekan.domain.com
. Important that removing debug mode will roll back the code and you will lose your code changes (as mentioned in the beginning).Let me know if you need help.