From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Zamboni Subject: Re: Moving from Jekyll to Orgmode Date: Mon, 30 Apr 2018 22:28:03 +0200 Message-ID: <02CE4F97-08E0-4A50-9CE5-68D0D7712ACD@zzamboni.org> References: <1524949519.21032.171.camel@gmail.com> <874ljump59.fsf@atmarama.com> Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_EF3C6861-5166-4F2B-BC49-AB564FEDBB8F" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDFPX-0006Rg-Po for emacs-orgmode@gnu.org; Mon, 30 Apr 2018 16:28:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDFPU-0008MA-Ic for emacs-orgmode@gnu.org; Mon, 30 Apr 2018 16:28:35 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:38642) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fDFPU-0008LC-5r for emacs-orgmode@gnu.org; Mon, 30 Apr 2018 16:28:32 -0400 Received: by mail-wm0-x232.google.com with SMTP id i3so16179219wmf.3 for ; Mon, 30 Apr 2018 13:28:31 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Luis Roca Cc: Diego Zamboni , emacs-orgmode@gnu.org --Apple-Mail=_EF3C6861-5166-4F2B-BC49-AB564FEDBB8F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Luis, easy-hugo is simply a control layer over plain Hugo. As such, when you = write a post in org format, it=E2=80=99s not org-mode but Hugo who is = doing the interpretation, using the goorgeous library = (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=E2=80=99s = 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/ = ) 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=E2=80=99s doable = if you want it). Another very nice ox-hugo feature is its =E2=80=9COne post per Org = subtree=E2=80=9D mode = (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=E2=80=99t 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/ and for = 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 = ) at https://ox-hugo.scripter.co/doc/examples/ = Hope this helps, =E2=80=94Diego > On 29 Apr 2018, at 14:55, Luis Roca wrote: >=20 > On Sun, 2018-04-29 at 09:45 +0200, Sa=C5=A1a Jani=C5=A1ka wrote: >> ST writes: >>=20 >>> 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: >>=20 >> I recommend you to take look at ox-hugo (https://ox-hugo.scripter.co/ >> ) >>=20 >>=20 >> Sincerely, >> Gour >>=20 >=20 > I tested easy-hugo recently but the exporting of org files was > inconsistent with headlines and content separated. Does ox-hugo export > well consistently?=20 >=20 > If so I may try Hugo again. >=20 > Thanks in advance, > Luis >=20 --Apple-Mail=_EF3C6861-5166-4F2B-BC49-AB564FEDBB8F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = Luis,

easy-hugo is = simply a control layer over plain Hugo. As such, when you write a post = in org format, it=E2=80=99s not org-mode but Hugo who is doing the = interpretation, using the goorgeous library (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=E2=80=99s 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/) 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=E2=80=99s= doable if you want it).




Tip: I learned a lot by = reading the source files for https://ox-hugo.scripter.co/ and for 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) at https://ox-hugo.scripter.co/doc/examples/

Hope this = helps,
=E2=80=94Diego

On 29 = Apr 2018, at 14:55, Luis Roca <roca@pobox.com> wrote:

On = Sun, 2018-04-29 at 09:45 +0200, Sa=C5=A1a Jani=C5=A1ka 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


= --Apple-Mail=_EF3C6861-5166-4F2B-BC49-AB564FEDBB8F--