Hi Luis,

easy-hugo is simply a control layer over plain Hugo. As such, when you write a 
post in org format, it’s not org-mode but Hugo who is doing the interpretation, 
using the goorgeous library (https://github.com/chaseadamsio/goorgeous/ 
<https://github.com/chaseadamsio/goorgeous/>). This is why there are 
inconsistencies and other problems in parsing - goorgeous does not support the 
whole range of org-mode constructs. I originally started with easy-hugo as 
well, and got increasingly frustrated by some of these issues.

ox-hugo takes a different approach: it uses org-mode’s ox-markdown exporter to 
produce Markdown from the org source, so that Hugo processes a Markdown file. 
This makes a big difference, as each tool is processing its own native format: 
org-mode processes org, and Hugo processes Markdown. Thanks to this, you can 
even include Hugo shortcodes (https://gohugo.io/content-management/shortcodes/ 
<https://gohugo.io/content-management/shortcodes/>) in your org-mode source, 
and they will be passed untouched to Hugo (this is not entirely advisable as it 
makes your source Hugo-specific, but it’s doable if you want it).

Another very nice ox-hugo feature is its “One post per Org subtree” mode 
(https://ox-hugo.scripter.co/#screenshot-one-post-per-subtree 
<https://ox-hugo.scripter.co/#screenshot-one-post-per-subtree>), in which you 
keep your entire post tree (in fact, you could keep your entire website) in a 
single Org file. I was skeptical about this at first (who wants to keep 
*everything* in a single file), but in practice it works very well, and allows 
you to have tags/categories or other attributes per subtree, so you don’t have 
to repeat them on every post. If you really want to keep each post in a 
separate file, that is doable as well. The ox-hugo website has a lot of very 
useful information.

Finally, you can do the transition gradually - for my website, I had years of 
accumulated Markdown files from my adventures with Jekyll, Octopress and later 
Hugo. Those are still in place, and I have started only putting my new posts in 
an org file which ox-hugo processes. Since those are converted to Markdown 
files, they end up alongside the old hand-crafted files, and Hugo just 
processes them all together.

I really recommend ox-hugo, Kaushal has done a fantastic job and he is also 
really helpful and responsive with questions.

Tip: I learned a lot by reading the source files for 
https://ox-hugo.scripter.co/ <https://ox-hugo.scripter.co/> and for 
https://scripter.co/ <https://scripter.co/>, both of which are kept in ox-hugo 
structure. You can find pointers to those and some other examples (including my 
own websites, zzamboni.org and cf-learn.info <http://cf-learn.info/>) at 
https://ox-hugo.scripter.co/doc/examples/ 
<https://ox-hugo.scripter.co/doc/examples/>

Hope this helps,
—Diego

> On 29 Apr 2018, at 14:55, Luis Roca <r...@pobox.com> wrote:
> 
> On Sun, 2018-04-29 at 09:45 +0200, Saša Janiška wrote:
>> ST <smn...@gmail.com> writes:
>> 
>>> I would like to rewrite my website using Orgmode (till now I used
>>> Jekyll). It would be nice if you could help me with following
>>> questions:
>> 
>> I recommend you to take look at ox-hugo (https://ox-hugo.scripter.co/
>> )
>> 
>> 
>> Sincerely,
>> Gour
>> 
> 
> I tested easy-hugo recently but the exporting of org files was
> inconsistent with headlines and content separated. Does ox-hugo export
> well consistently? 
> 
> If so I may try Hugo again.
> 
> Thanks in advance,
> Luis
> 

Reply via email to