This is my very first blog post as a python developer. I am working as a python developer in well-reputed company of my country. So I though I would start a blog to share my thoughts, my experiences and many more with you.
So I thought to start a new blog to share those things. So Here I came... !I selected default blogspot theme as my blog theme. I think this will help me to create a very simple blog site.Once I selected the theme, I want to use syntax highlighting facility. Because I post some sample code snippets here to demonstrate some tutorials in the future.
So syntax highlighting facility to my code snippets is a must !
I googled this and I got dozens of outside javascripts and css files to fulfil my requirement. But the issue is that I would not interested in including outside js or css files to my blog. The main reason is sometimes those sites get stopped without any notification.
So I found a way to host all js and css files in the blogspot itself. I could find 2 main ways to host those files. Here are them...
Method #1 - Host js files in the blogspot template itself
We can host our js files in the blogspot template itself by using //<![CDATA[ and //]]> tags
<script type="text/javascript">
//<![CDATA[
put javascript code here
//]]>
</script>
Method #2 -Host js files in the blogger widgets of the blog layout.
You can host your js file in the blogspot widgets.
I used 1st method to add external js file to my blogspot template. So now I can use syntax highlighting facility within my blog premises.
That is all for today. Hope you will keep in touch with me in the future posts as well. Good Day Developers !!
Comments
Post a Comment
Any Questions ? Leave a Comment