Setting up a Theme to work with Gitify
Start by clicking the green New
button when signed into Github. Give your new repository a name and description. This will be the source “origin” for collaborators. You should not initialize the repository with a README file because one will be added by the Theme later.
Note the URL for this project, by clicking the down-arrow on the green Clone or download
button and choose the SSH URL, like git@github.com:your_name/example_theme.git
.
Connect to your Theme MODX project
SSH into your Cloud, and switch to the www/
webroot directory. Then initialize git with the following command, using the SSH URL from above:
Git Ignore
Create a .gitingnore
file to exclude MODX and other files that are not needed with the following content. Make sure to change !/assets/themes/{{your-theme-name}}
to its actual name like !/assets/themes/lightcoral
:
The Gitify YAML configruation
Create a yaml file named .gitify
file in the webroot directory with following content:
This will instruct Gitify to include all Elements and categories, their Option Sets, public Blueprints and categories, RTE configs, and the Themes. Media sources are not currently supported for Theme exports and are therefore omitted.
Intial Commit
Now it’s time to push the code to the source repo. Once you’ve reached a point where you are ready to share and collaborate on a theme, execute the following:
Now you are ready to start working with others.