moski / gist-Blogger

Adding Gist support to blogger dynamic view
http://blog.moski.me/2012/01/gist-with-bloggers-dynamic-views.html
85 stars 52 forks source link

Mobile template doesn't load gist but dynamic view does #10

Open mezpahlan opened 9 years ago

mezpahlan commented 9 years ago

The instructions in the Readme allow gists in dynamic views, yaaaay! However my blog is set up to use a mobile friendly template when Blogger detects a mobile device. This doesn't load the gist-Blogger workaround and as a result only displays the text within the <div> tag.

This:

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

Displays:

Loading ....

As a workaround I use the following form in my HTML for my blog so that it gracefully degrades to using the proper GitHub gist loading script on mobile. However on desktop it uses gist-Blogger correctly.

<div class="gistLoad" data-id="GistID" id="gist-GistID">
    <script src="https://gist.github.com/GitUserName/GistID.js">Loading ....</script>
</div>

Can this be rolled into the code somehow? Or the Readme updated?