Adding Script tag in Blogger Dynamic View

☆樱花仙子☆ 提交于 2019-12-07 12:42:14

问题


I have a blog with "Dynamic View" as the template (The one with Sidebar/Mosaic and other options). I was trying to use GIST/Github as my default syntax highlighter as it works like a charm.

However the "script" tags included in the Blog POST do not get rendered. Is there anyone who has managed to add Script tags to their Dynamic View Template?

(Obviously there are other ways of embedding syntax highlighting but I feel Gist is the most elegant of them all)


回答1:


This link works perfectly fine for me

http://blog.moski.me/2012/01/gist-with-bloggers-dynamic-views.html

At the end of each of your blog posts, include the following code using the HTML editor:

<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>

Now to include any gist template just add the following anywhere in your blog post.

<div class="gistLoad" data-id="GistID" id="gist-GistID">Loading ....</div>

Replace "GistID" with your gist id.



来源:https://stackoverflow.com/questions/12179467/adding-script-tag-in-blogger-dynamic-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!