【问题标题】:Image not showing in Blog made using Jekyll in github使用 github 中的 Jekyll 制作的博客中未显示图片
【发布时间】:2018-06-27 10:26:49
【问题描述】:

我使用 github 页面创建了一个博客,但图像没有加载。我已经尝试了所有方法,但我仍然坚持使用它。 我的github代码的链接是here

问题出在文件 _posts/2017-04-02-Kronothon.md 中,图像在 /assets/Kronothon1.png 中。

请帮我解决这个问题。 可以看博文here

【问题讨论】:

    标签: github jekyll github-pages


    【解决方案1】:

    以下配置设置错误!

    baseurl: "https://shivank01.github.io/"
    url: ""
    

    相反,完全删除 baseurl 并将 url 设置为网站的着陆点:

    # baseurl: "" (commented out)
    url: "https://shivank01.github.io"
    

    【讨论】:

      【解决方案2】:

      尝试https://shivank01.github.io/assets/Kronothon1.png 而不是/https://shivank01.github.io/%20/assets/Kronothon1.png。图片网址有问题。在 config.yml 文件中检查它。希望这会有所帮助:)

      【讨论】:

        【解决方案3】:

        \config.yml

        baseurl: "/hcz-jekyll-blog"
        url: "https://shivank01.github.io"
        

        调用你的图片(如 Subash Chandra Manohari 所述)

        ![Pic1]({{ "/assets/Kronothon1.png" | absolute_url }})
        

        而不是

        ![Pic1]({{ " /assets/Kronothon1.png " | absolute_url }})
        

        【讨论】:

          猜你喜欢
          • 2020-08-02
          • 1970-01-01
          • 2017-09-08
          • 1970-01-01
          • 2020-05-06
          • 2020-09-16
          • 1970-01-01
          • 1970-01-01
          • 2011-10-07
          相关资源
          最近更新 更多