I have a website created on SquareSpace and would like to add some additional code via a code injection. I know that SquareSpace gives the option to use a manual code injection in their code injection tab but this can get messy very quickly. I would also like to use version control without having to manually copy and paste all my lines of code from git into the injection tab.
What I would like to do is inject my own code by adding a script tag that points to my gitHub or to a private server.
The issue that I am having is that I would like to keep my gitHub repository private. Is there a way to use a .js file for a private gitHub repository for example <<script type="text/javascript src="https://github.com/myRepo/myExampleFile"></script>? I imagine the answer is probably "No" but thought its worth a shot just incase...
My second question is related to using a http server. Can I host my .js file on a http server and use that to inject my code into my site, for example <script type="text/javascript src="http://1.2.3.4/myFiles/test.js"></script>? This would be a great solution too as I could deploy my build files to the server and still keep all my code in version control.
Are any of the above possible or does SquareSpace strictly only accept https code injections?
All answers are appreciated, I do apologies if my questions seem stupid or obvious.
Thank you all in advance.