shenoydotme / hugo-goa

Simple Minimalistic Theme for Hugo
https://shenoydotme.github.io/hugo-goa-demo/
MIT License
265 stars 129 forks source link

Enable picture in the blog article #58

Closed Heceo closed 5 years ago

Heceo commented 5 years ago

Hello!

This is a concise and wonderful theme for blogs, but I'm wondering where to enable showing pictures in the articles of blog. It seems that the function isn't supported. But I don't think a blog is complete without pictures. I really appreciate it if you tell me how to do.

pineapplegiant commented 5 years ago

I've also had this problem. So far I've been just adding the raw html as a temporary hack. Sometimes I'll wrap it in a center tag width some styling or sizing.

<center><img height="400" width: "400"src="/img/image.jpg></center>

Although the more pleasing markdown way would be nice:

![My hip image](/img/image.jpg)

I haven't really looked into a solution though, but I don't think it should be too bad...

gmagno commented 5 years ago

Hugo's Figure shortcode works fine for me:

{{< figure src="/img/fig.jpg"
    title="Some title"
    width="300"
>}}

The markdown also works:

![Some image](/img/fig.jpg)

I hope it helps. More info here: Hugo's Figure shortcode

pineapplegiant commented 5 years ago

Okay so I misspoke, the markdown way does work, but it doesn't deal with image resizing very well, it just dumps the image in there messing up the scroll of the text.

But that shortcode works flawlessly, Thanks @gmagno.