How to install theme component with app.yaml or from local device?

AI-generated summary

Yaoqi_Yan is running a Discourse server on Kubernetes and wants to install the DiscoTOC theme component either via app.yaml or from a local device, since GitHub access is blocked. They initially tried cloning via app.yaml but found it unsuitable for their setup Yaoqi_Yan. When attempting local installation, they encountered an error: Import Error: about.json does not exist, or is invalid Yaoqi_Yan. JammyDodger tested the process and confirmed it works when downloading the correct ZIP file directly from GitHub’s repository JammyDodger. Yaoqi_Yan later confirmed success using the GitHub-downloaded ZIP — but noted that unzipping and re-zipping on macOS breaks the theme Yaoqi_Yan. Falco pointed to an official guide on programmatic theme installation Falco, though JammyDodger questioned its relevance without GitHub access JammyDodger. Yaoqi_Yan confirmed local installation works once the correct ZIP is used Yaoqi_Yan.

My discourse server is in K8s.
Can I install theme component(for example discoTOC) with bellow app.yaml config? If not, how to install from my local device?(the k8s is not allowed to access github).

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/xxx.git

I tried to install discoTOC(download from github) from local device but report bellow error

Import Error: about.json does not exist, or is invalid. Are you sure this is a Discourse Theme?

I have just tried the same thing on my test site and it worked for me? Have you grabbed the right file?

https://github.com/discourse/DiscoTOC

Thanks for your reply. It works.
The point is using zip file downloaded from GitHub.
unzip and re-zip file doesn’t work on MAC

We have a guide on this, see:

Would that work if you can’t access GitHub?

yes. Local device installation works .