When you are done making a classic UI theme, how do you export it?

Hello, so I just have a quick question about theming. I ended up deciding that the best route for configuring my website was to use the classic ui, and it has been working well.

However, I have encountered a bit of confusion in compiling the CSS theming I created into a final zip file I can easily deploy on my production server. I used the plone theming documentation here to make some basic coloring changes for my organization: Create a theme based on Barceloneta – Plone 6 Classic UI Theming — Plone Training 2024 documentation, and when running in an addon form as described in this documentation on my local machine, this is totally fine. However, when I go to my local host website and go into the theming panel to download a zip file of the theme I made, I am noticing it ends up giving me this huge 400+ mb file that plone does not accept as a theme when uploaded to my production server, and includes all of the base / default files still in it that are not really a part of the theme I made such as old default favicons, the whole myaddon.name folder, and details from the default theme as well.

Does anybody happen to have any potential solutions to this?

Hi!

If you download your theme you should only get the files inside the /theme folder of your addon.

As a solution you could zip your theme/ folder of your filesystem theme addon and upload it.

But there is something important: you have to rename your theme/ folder to what is defined as "prefix" in your manifest.cfg. For example if you have defined prefix=/++theme++my-addon-theme in your manifest, you have to rename your theme folder to my-addon-theme and then zip it. Otherwise the uploaded files cannot be found.

And a second note: during my tests right now I've encountered a bug in Plone resource registry, which prevents resource files from an uploaded theme to load correctly. See Fix possible `Pdata` objects in `OFS.File` resources by petschki · Pull Request #4038 · plone/Products.CMFPlone · GitHub

Hope it helps.

So I think this may be on the right track but it is still not quite working for me. Basically, the "Theme" folder the way I configured it trying to follow along with the theme creation tutorial seems to contain two theme folders. Firstly, there is the seemingly default theme contained at this directory within the overarching theme folder: /home/anon-3/plonetheme.tester/src/plonetheme/tester/theme/myaddon.name/src/myaddon/name/theme

then, there is the files for the theme I am trying to edit contained at this directory: /home/anon-3/plonetheme.tester/src/plonetheme/tester/theme/ (along with the path to the above mentioned default theme, this folder contains a lot of files).

Zipping up the entire /tester/theme/ folder manually creates the massive file I was referring to earlier and does not work.

Should I just start from scratch at this point? I only made a few dozen lines of css and feel like I may have just messed up the configuration steps somehow if the file layout looks this messy. If not, do you know exactly which folder / directory I should be zipping up renamed the way you described, and what files (if any) I should be removing as well when doing so if the folder I need to zip for example is the large over arching plonetester/tester/theme

P.S: /home/anon-3/plonetheme.tester is the root folder I started this entire project in, so at the very least plonetheme.tester is not anything plone created and was just a contained area I made to work on this to make it slightly less confusing compared to all of this just being in my home folder.

Sorry in advance if this file structure is completely non-understandable.

Hm ... your folder structure looks like you've created an addon inside an addon ... thats not how its supposed to be. "myaddon.name" should not live inside the theme folder. I'm not quite sure what you try to achieve but you should follow these steps:

  1. create an addon "myaddon.whatever"
    2.1 add a theme inside the addon
    2.2 add inside the addon

See also the classic-ui theming documentation fore more info on this Classic UI theming based on Barceloneta – Classic UI – Theming of Classic UI — Plone Documentation v6.0