masasam / emacs-easy-hugo

Emacs major mode for managing hugo
https://gohugo.io/tools/editors/#emacs
GNU General Public License v3.0
355 stars 26 forks source link

images with posts and/or bundle #40

Closed gour closed 6 years ago

gour commented 6 years ago

Hello,

I like to put images which are part of the post in a dedicated folder, iow. something like:

test.md
test
└── myviber.jpg

which allows me to reference the image within test.md as:

{{< figure src="myviber.jpg" alt="My Viber" class="center" >}}

so I wonder what do you think about adding support for that?

Moreover, newer versions of Hugo also support bundles with the same/similar functionality, so the same question about support for that in Easy Hugo?

masasam commented 6 years ago

Hi @gour . Which version of hugo did you add this feature? It does not work on my hugo 0.40.2

gour commented 6 years ago

Which version of hugo did you add this feature?

That feature is present long time in Hugo - see e.g. this thread.

It does not work on my hugo 0.40.2

I have the same version and it does work...iow, try to mimic your setup like:

├── test
│   └── myviber.jpg
└── test.md

and have the following content in test.md:

---
title: "Test"
date: 2018-05-10T10:44:03+02:00
draft: true
---

This is a test post!

{{< figure src="myviber.jpg" alt="My Viber" class="center" >}}

It works with this as well:

![My Viber](myviber.jpg) "my Viber"){center}
masasam commented 6 years ago

I do your sample with multiple blogs but It doesn't work

gour commented 6 years ago

test.tar.gz

Here is complete Hugo site to test with.

masasam commented 6 years ago

@gour I do your test.tar.gz but it doesn't work. For me this seems to be your personal function Please set it with your init.el. It will not be adopted as a easy-hugo sorry.