添加图像到使用hugo框架的网页 [英] Add image to webpage which uses hugo framework
问题描述
我的内容发布并且存储在这里:home / content / post
我创建了一个文件夹这里的图片:home / content / post / images
当我插入图片到图片后,图片将不会发布。我试过在下面的帖子中使用相关的短代码,但没有运气:
- {{< figure src =image / image_name.pngtitle =image title>}}
- {{< figure src =/ image / image_name.pngtitle =image title>}}
其中:
- 图像存储在此处:home / content / post / images / image_name.png
- :home / content / post / post_title.md
我怀疑问题是我添加的新图像文件夹不知何故被看到 。
请帮忙!
我指的是错误的途径。 D'oh!
{{< figure src =../ image / image_name.pngtitle =image title>}}
I want to post an image onto my blog (yes that simple!)
My website is hosted on GitLab Pages and uses the Hugo framework (v0.23). I forked my webpage from here, https://gitlab.com/pages/hugo (thus my blog folder structure is the same).
My content publishes fine and is stored here: home/content/post
I created a folder which stores images here: home/content/post/images
When I insert an image into a post the image won't publish. I've tried using the relevant short code in the post (below) with no luck:
- {{< figure src="image/image_name.png" title="image title" >}}
- {{< figure src="/image/image_name.png" title="image title" >}}
where:
- the image is stored here: home/content/post/images/image_name.png
- the post is stored here: home/content/post/post_title.md
I suspect the problem is the new images folder I added is somehow not "seen".
Please help!
The problem was easily fixed, I was pointing to the wrong pathway. D'oh!
{{< figure src="../image/image_name.png" title="image title" >}}
这篇关于添加图像到使用hugo框架的网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!