【问题标题】:Automatically changing of script src when jekyll gist tag is used with private gist当 jekyll gist 标签与私有 gist 一起使用时自动更改脚本 src
【发布时间】:2013-07-29 00:48:17
【问题描述】:

我有一个私人要点,我想将它嵌入到我由 github 托管的 jekyll 站点中。但是每当我使用以下方法嵌入它时:

{% gist 931c1c8d465a04042403 %}

它会自动变为:

<script src='https://gist.github.com/931.js?file=c1c8d465a04042403'> </script>

没有结果。

我已经用 public gist 试过了,例如:

{% gist 5555251 %}

它变成:

<script src='https://gist.github.com/5555251.js'> </script>

产生结果。我试过使用:

<script src='https://gist.github.com/467f46c5cde7b2422ffe.js'> </script>

直接在我的文件中,结果在 localhost 中可以看到,但 github 仍然没有显示任何结果。

请帮忙。

【问题讨论】:

    标签: javascript github jekyll gist


    【解决方案1】:

    使用脚本标签解决了我的问题。问题出在我的浏览器离线数据上。之后,从浏览器存储中清除所有内容,gist 也会显示在 github 中。我仍然很困惑为什么是

    {% gist 931c1c8d465a04042403 %}
    

    改成

    <script src='https://gist.github.com/931.js?file=c1c8d465a04042403'> </script>
    

    什么都不生产。

    【讨论】:

      猜你喜欢
      • 2021-04-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-13
      • 2014-12-07
      相关资源
      最近更新 更多