I have developed a simple jQuery plugin and uploaded it to Github. I am using both the Github website and Github for Windows to manage this project.
However, when I try to include the .js or .css files from Github using the Raw links, my browser fails due to the MIME-type being set as plain/text.
After spending hours researching, I understand that creating a project page (gh-pages branch) is the first step to make these files accessible for linking. But most of the guides I found assume a UNIX-based system or require console-based tricks:
References: GitHub, SO, SO
There must be a simpler way to share these source files for inclusion. After automating the creation of a 'project page', I'm now faced with another branch that appears to lag behind the 'master' branch, leaving me confused on the next steps. It's unclear why I need to create an additional branch in the first place, making this process unnecessarily complex.
To summarize:
- Created a new branch in Github (using Windows app and website)
- Able to manage and update files without issues
- Cannot include .js and .css files using 'raw' links
- Desire to include these files on a page
- Hoping to achieve this via Github for Windows or the website itself
If anyone can provide guidance on this matter, I would greatly appreciate it, and I believe many others would benefit from a clear solution as well.
EDIT: Referencing a popular Github project where files are easily accessible through Github:
Select2:
EDIT2: I now understand the purpose of creating a separate branch to share files, as Github's source control is not intended to act as a CDN. The project page serves as a public platform for hosting files, so the question now shifts to how I can transfer files from the master branch to the gh-pages branch. I simply want access to the directory structure to manually place the files there, without worrying about automation at this point. Despite being "10 commits behind," syncing my branch with Github Windows shows no content to retrieve from the gh-pages branch. What could be causing this?
EDIT3: Added my own findings and solutions to the situation thus far.