emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Diego Zamboni <diego@zzamboni.org>
To: Luis Roca <roca@pobox.com>
Cc: Diego Zamboni <diego@zzamboni.org>, emacs-orgmode@gnu.org
Subject: Re: Moving from Jekyll to Orgmode
Date: Mon, 30 Apr 2018 22:28:03 +0200	[thread overview]
Message-ID: <02CE4F97-08E0-4A50-9CE5-68D0D7712ACD@zzamboni.org> (raw)
In-Reply-To: <f6c8f45d8616b600ba92bf5f9e8837dc5cc45b6b.camel@pobox.com>

[-- Attachment #1: Type: text/plain, Size: 3553 bytes --]

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 <roca@pobox.com> wrote:
> 
> On Sun, 2018-04-29 at 09:45 +0200, Saša Janiška wrote:
>> ST <smntov@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
> 


[-- Attachment #2: Type: text/html, Size: 4966 bytes --]

  reply	other threads:[~2018-04-30 20:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-28 21:05 Moving from Jekyll to Orgmode ST
2018-04-28 21:40 ` Diego Zamboni
2018-04-28 21:42   ` Diego Zamboni
2018-04-28 22:13   ` Scott Randby
2018-04-29  8:50     ` ST
2018-04-29  9:07       ` Bastien
2018-04-29  9:22         ` ST
2018-04-29 12:58       ` Ista Zahn
2018-04-29 14:45       ` Scott Randby
2018-04-29  7:45 ` Saša Janiška
2018-04-29 12:55   ` Luis Roca
2018-04-30 20:28     ` Diego Zamboni [this message]
2018-04-30 22:43       ` Kaushal Modi
2018-05-01 18:41         ` Diego Zamboni
2018-05-04  6:49         ` Thomas S. Dye
2018-05-04 13:43           ` Kaushal Modi
2018-05-04 13:53             ` Kaushal Modi
2018-05-04 15:07             ` Thomas S. Dye
2018-04-29 16:45 ` Grant Rettke
2018-04-30 10:58   ` ST
2018-05-05 17:51 ` Rasmus
2018-05-07  8:39   ` ST
2018-05-07 22:21     ` Rasmus
2018-05-09  7:35       ` ST
2018-05-09  8:03         ` Thomas S. Dye
2018-05-09 12:37           ` ST
2018-05-09 11:38         ` Diego Zamboni
2018-05-09 12:21         ` Kaushal Modi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02CE4F97-08E0-4A50-9CE5-68D0D7712ACD@zzamboni.org \
    --to=diego@zzamboni.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=roca@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).