HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Managing a custom theme with git

Hi All.

Couldn't post this in the development category. Hope it's OK here.

Helping someone move to Vanilla for the next iteration of their site. All of the rest of the site's code is managed with git (including using git hooks for deployment, etc). Would like to keep the site's custom theme in the same repository but obviously do not want to include all of Vanilla in the repo!

My first thought was to use some sort of bash scripting to copy (or symlink) the theme files in the site's git repo to the correct place within the Vanilla folder structure. I haven't actually developed anything with Vanilla since V1 (circa 1937, in Internet years) so I've missed quite a lot! So, I'm wondering if there's a better, more 'Vanilla' way to do this. I did search for quite a bit but I haven't found anything specific to this scenario.

Along the same lines, would be interested to hear any experiences self managing Vanilla with git, composer, etc.

Comments

  • I have the following setup:

    Folders for my development files:
    My applications: ~/develop/vanilla/applications
    My plugin: ~/develop/vanilla/plugins
    My themes: ~/develop/vanilla/themes

    Folder for Vanilla:
    The current release: /var/www/vanilla/release
    The current beta (if any): /var/www/vanilla/beta
    A clone of the GitHub vanilla repo: /var/www/vanilla/master
    A clone of the GitHub addons repo:/var/www/vanilla/addons

    And following urls:
    release.example.com
    beta.example.com
    master.example.com

    I use symlinks for each plugin of my development folder. The advantages for me are that I can test my plugins easily with more than one version of Vanilla and that making backups is quite easily.

    In theory it would be even better if all subfolders of /var/www/vanilla would be cloned repositories, since making a pull request against the current release would be easier. But Vanilla requires some build steps and I prefer working with the official zip files to be able to give feedback if something has been forgotten there and I try not to work with self-patched Vanilla files in my release folder but with the original files (which sometimes happens nevertheless, since I do a lot of debugging by directly messing with the source files)

  • Good stuff @R_J. Thanks very much for the insight into how you have things set up.

    Sounds like I should keep it simple and investigate a symlink pointed at custom theme folder in my main site repo.

Sign In or Register to comment.