I have created several JavaScript (JS) and Cascading Style Sheet (CSS) for my Syntax Highlighter mentioned in previous post. Since I can't host these files in Blogger, I try to look for some free hosting services.
I tried uploading these files into Google Sites (with a page set as file cabinet), and refer to the file link address (without the ?attredirects=0&d=1). It seems to work initially but I realize that it only works when I am logged into my Google account. I also tried the Google Docs (Google Drive now) and refer to its embedded link. I have no luck with that at all.
So, right before I was about to give up looking at Google services, I found Google Code, a free open source project hosting service. Well, since my files are open sourced, I have no problem hosting them here. However, there is one caveat of hosting CSS files here. All the source code uploaded to Google Code is defaulted with mime-type of text-plain. That is fine with JavaScript as most of the browser recognize them, but it is not the case for CSS. I did more research, and finally found that the mime-type property could be configured through subversion. Nice!
Andrei Zagorneanu provides a step-by-step instructions (link) from creating your project in Google Code and using TortoiseSVN Subversion client (for Windows OS) to change the mime-type property. If you are using Linux/Unix, you can refer to some of the commands here (SVN Tutorial) and here (Subversion FAQ).
If you are having much problem with these services, you can also try other free hosting services like yourjavascript or dropbox. I have never tested them but from what I read, other people seem to have some success with them. Good luck!
No comments:
Post a Comment