kaushalmodi / ox-hugo

A carefully crafted Org exporter back-end for Hugo
https://ox-hugo.scripter.co
GNU General Public License v3.0
867 stars 130 forks source link

Image link org-mode to markdown #705

Open aidinbii opened 1 year ago

aidinbii commented 1 year ago

Hi, how to write in org-mode, so that in markdown it will be: ![alt text](dummy-image.png "Image Title")

For example if I have in org-mode: [[file:static/images/misc/old_man_writing.jpg]]

it gets exported: {{< figure src="/images/misc/old_man_writing.jpg" >}}

Thanks!

dvorak0 commented 1 year ago

I also need this. the current export setting will prevent from using markdown render hooks as it hard-coded figure.

Why is it designed like this? or is there any way to workaround the limitation?

Thanks.

dvorak0 commented 1 year ago

I found a way to workaround: override the implementation for figure using shortcodes

aidinbii commented 1 year ago

@dvorak0 , could you please share the code?

dvorak0 commented 1 year ago

@dvorak0 , could you please share the code?

here you are. https://github.com/dvorak0/smol/blob/master/layouts/shortcodes/figure.html