[SOLVED] wcms-modules.json Woes!
Posted: Fri Feb 04, 2022 12:27 am
I'm developing a WonderCMS theme. Since v3.3.0 we've been asked to add a file file wcms-modules.json to our repository. As I write the documentation at https://github.com/robiso/wondercms/wiki/Custom-modules says it should take the form:
After substituting my "yourUsername" and "theme-name" I got a couple of error messages when entering the json file into the . I visited the Sky theme page to see a working version and see it's .json file does not include the "refs/heads/" folders in its "zip:" line. I removed those folders from my file and once I'd discovered the correct URL to use to add my repository to my installation of WCMS all was well.
I'm not clear if the additional folder references in the "zip" line may be required in some circumstances. If so then I suggest the documentation at https://github.com/robiso/wondercms/wiki/Custom-modules explain what those might be.
As for the second error message, Entirely my fault! I had failed to read the whole page and spent some time using trial and error to find the correct form of URL to use to add the repository to my copy of WonderCMS! I missed that the answer is already there! It's:
Code: Select all
{
"version": 1,
"themes": {
"theme-name": {
"name": "Name of your theme",
"repo": "https://github.com/yourUsername/theme-name/tree/master",
"zip": "https://github.com/yourUsename/theme-name/archive/refs/heads/master.zip",
"summary": "My sample theme",
"version": "2.0.0",
"image": "https://raw.githubusercontent.com/yourUsername/theme-name/master/preview.jpg"
}
}
}
I'm not clear if the additional folder references in the "zip" line may be required in some circumstances. If so then I suggest the documentation at https://github.com/robiso/wondercms/wiki/Custom-modules explain what those might be.
As for the second error message, Entirely my fault! I had failed to read the whole page and spent some time using trial and error to find the correct form of URL to use to add the repository to my copy of WonderCMS! I missed that the answer is already there! It's:
Code: Select all
https://raw.githubusercontent.com/yourUsername/theme-name/master/wcms-modules.json