[SOLVED] How to show GitHub pages hosted code in Blogger


#1

How to show GitHub pages hosted code in Blogger


I am using GitHub pages to host my blog code now and I don’t know how to show the code on my blog in a post or widget for example. Do I use somthing like…

GET GITHUB PAGE URL HERE

…or…

POST GITHUB PAGE URL HERE

… I’m using GitHub hosting so that I can keep it organized a little better and so that it’s easier to update.

Thanks.


#2

I don’t Understand what do you mean?

Do you want to host your CSS/ECMA’s outside and add it to blogger?

If yes then add this code in the <head> of your blogger template

 <link  rel="stylesheet" href="YourSourceurlhere" type="text/css" />

#3

I’m using github pages to host my blogger code. For widgets that I add from other sites that are html or java or CSS I put that code in github pages. Then I want to be able to display that code on my blog and I don’t know what code to put in the widget.



Thanks @Nafees but that’s not what I want.


#4

Sorry but you can not host HTML externally!


#5

what about Javascript and CSS? Can those be on github?


#6

Yes they can be.What you have to get is source url!

For ex:-

Your Source url for css is : www.mydomain.com/styles/style.css

You’ll have to add this line of code into your template’s head section

 <link  rel="stylesheet" href="www.mydomain.com/styles/style.css" type="text/css" />

And if you have your Javascript :

Your Source url for JS is : www.mydomain.com/scripts/main.js

You’ll have to add this line of code into your template’s head section

 <script src="www.mydomain.com/scripts/main.js" />

You can add scripts also before you closing body tag, ie: </body>