html - 图片未显示在 jerkyll 博客文章中
问题描述
我尝试在我的 github 博客文章(我使用 jekyll 创建)中显示图像:
<img src = "./images/scatterplot.png" width="400" height="300" />
该图像显示在降价文件中,但无法在实际博客中输出。任何建议都会非常有帮助,在此先感谢!
正如其中一个回复中提到的,我试图打开图片链接:https://surajsubramanian.github.io/posts/simple-linear-regression-from-scratch/images/scatterplot.png
这很奇怪,为什么它在路径中取了我的帖子的名称。
路径应该是 https://surajsubramanian.github.io/posts/images/scatterplot.png
解决方案
这里是 img 的正确链接: https ://raw.githubusercontent.com/SurajSubramanian/SurajSubramanian.github.io/master/_posts/images/scatterplot.png
要在网络浏览器上知道图片的 URL(右键单击图片 -> 在新选项卡中打开图片,您会得到正确的 URL)
img 会是这样的:
<img src="https://raw.githubusercontent.com/SurajSubramanian/SurajSubramanian.github.io/master/_posts/images/scatterplot.png" width="400" height="300" />
推荐阅读
- sql - 按名称分组的连续日期范围内的最小和最大日期
- c++ - CPU如何“投射”浮点x87(我认为)值?
- c++ - g++ 和双精度
- python-3.x - 如何在 Python 中对子类的更改最小的情况下稍微修改从父 __init__() 继承的属性?
- java - 从java中的文件中删除一个对象
- laravel - 如何使用 Laravel Dusk 或 WebDriverBy 在表格的“textarea”中输入文本?
- python - 如果元素相同,则用于查找索引元素的编号的 Python 列表索引
- swift - 如何在 SwiftUI 的不同视图中保留列表
- image - 用于内联图片或形状的 Word 2007 VBA 通配符
- swift - Audiokit AKSampler 作为单独类中的 AKNode/AKPolyphonicNode