Hi Kaushal,

> How about adding this to your emacs config:
> 
> …
> Make sure that that always evaluates before you do Org exports, and then 
> simply use this in your Org files:

Thanks for the tips! I hadn’t thought of adding the functions to my Emacs 
config, but that would work perfectly. On the other hand, it would be nice to 
make the org file fully self-contained :)

> PS: Thanks for sharing that code! You are following the vision of ox-hugo.. 
> replacing Hugo shortcodes with Org macros :+1: :) 

Thanks! This is exactly what I’m trying to do as I migrate my existing Hugo 
posts to ox-hugo (I migrate them whenever I need to update them in any way). My 
idea is to eventually republish some of my posts in a different format (as an 
ebook, maybe), so I want the text to be as Hugo-independent as possible. And 
the code is even more readable - I find Hugo’s macro language quite obscure. 
For example, here’s the same “hsapi” shortcode in Hugo: 
https://github.com/zzamboni/zzamboni.org/blob/master/layouts/shortcodes/hsapi.html
 
<https://github.com/zzamboni/zzamboni.org/blob/master/layouts/shortcodes/hsapi.html>

Cheers,
—Diego

Reply via email to