org-mode & Nikola

58 views
Skip to first unread message

Saša Janiška

unread,
Oct 16, 2016, 4:21:19 PM10/16/16
to nikola-...@googlegroups.com
Hello,

while investigating about the appropriate markup to be used for easily
creating bunch of slide-presentations (reveal.js), I’ve decided to
prepare them in org-mode since I’m already using it for other purposes.

Then I’ve discovered there are some possibilities to use org-mode for
Nikola posts. However, afaict, there are two different routes:

1) by using Nikola plugin (https://plugins.getnikola.com/#orgmode) which
directly compiles *.org files and

2) ox-nikola (https://github.com/masayuko/ox-nikola) — exported
mechanism within Org-mode itself which can convert *.org file into
*.rst.

So, my gut feeling tells me that the 2nd method might be preferrable,
but still asking here to get advice from Nikola using writing their
posts in org-mode?


Sincerely,
Gour

--
As fire is covered by smoke, as a mirror is covered by dust,
or as the embryo is covered by the womb, the living entity is
similarly covered by different degrees of this lust.

Roberto Alsina

unread,
Oct 17, 2016, 4:57:14 AM10/17/16
to nikola-...@googlegroups.com
I don't personally use org-mode but using the native org format as source instead of exporting to rst sounds like a better idea. I know we have a couple of org-specific bugs like syntax highlighting not working perfectly because of different HTML generation, but those can and should be fixed while keeping things working "the right way".

Adding an export step in the middle usually makes things more fragile.

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Puneeth Chaganti

unread,
Oct 17, 2016, 5:59:28 AM10/17/16
to nikola-...@googlegroups.com

Roberto Alsina writes:

> I don't personally use org-mode but using the native org format as source
> instead of exporting to rst sounds like a better idea. I know we have a
> couple of org-specific bugs like syntax highlighting not working perfectly
> because of different HTML generation, but those can and should be fixed
> while keeping things working "the right way".
>
> Adding an export step in the middle usually makes things more fragile.

I'm with Roberto on not having additional export steps, and that's the reason I
originally created the org-mode compiler plugin for Nikola.

I'm guilty of not maintaining it very actively, though. I'll try to work on the
pending GitHub issues in the next couple of weeks.

Saša Janiška

unread,
Oct 18, 2016, 4:08:53 AM10/18/16
to nikola-...@googlegroups.com
Roberto Alsina <ral...@kde.org> writes:

> I don't personally use org-mode but using the native org format as
> source instead of exporting to rst sounds like a better idea.

Thank you for confirmation. ;)


Sincerely,
Gour

--
As a blazing fire turns firewood to ashes, O Arjuna, so does the
fire of knowledge burn to ashes all reactions to material activities.

Saša Janiška

unread,
Oct 18, 2016, 4:41:41 AM10/18/16
to nikola-...@googlegroups.com
Saša Janiška <go...@atmarama.com> writes:

> Thank you for confirmation. ;)

Now I see you thought just the opposite. :-)

Doing some testing now, will followup…

> Sincerely,
> Gour

--
A person who has given up all desires for sense gratification,
who lives free from desires, who has given up all sense of
proprietorship and is devoid of false ego — he alone can
attain real peace.

Saša Janiška

unread,
Oct 18, 2016, 5:03:20 AM10/18/16
to nikola-...@googlegroups.com
Puneeth Chaganti <punc...@muse-amuse.in>
writes:

> I'm with Roberto on not having additional export steps, and that's the reason I
> originally created the org-mode compiler plugin for Nikola.

I understand, although having additional extra steps are not so bad
considering one can directly export orgmode post under Nikola site’s
content area.

> I'm guilty of not maintaining it very actively, though. I'll try to work on the
> pending GitHub issues in the next couple of weeks.

For now I was just testing some esoteric issue - nested footnotes which
cannot be handled properly in many markup formats…

Both org-mode and rst can do it, bit there are differences in the
rendered output when one deploys both methods.

Here is the sample org-mode file:

#+BEGIN_COMMENT
.. title: Footnote Test
.. slug: footnote-test
.. date: 2016-10-18 10:43:50 UTC+02:00
.. tags: test
.. category: technical, nikola
.. link:
.. description:
.. type: text
.. author: Gour
#+END_COMMENT

* Footnote test post

This is a sentence to test[fn:1] nested footnotes.

That’s all for now!

[fn:2] And this is a second or nested one.

[fn:1] This is a first[fn:2] footnote.


Try to render it with e.g. default bootstrap theme.

When I use org-mode’s publishing/exporting platform to export the same
input file into Nikola post I get:

.. title: Export to Nikola
.. slug: export-to-nikola
.. date: 2016-10-18 10:51:57
.. tags: test, export
.. link: techical, nikola
.. description:
.. type: text
.. author: Gour

1 Orgmode plugin
----------------

This is a sentence to test [1]_ nested footnotes.

That’s all for now!


.. [1] This is a first [2]_ footnote.

.. [2] And this is a second or nested one.


which is more pleasing and according to the result I’d get if writing
directly in rst.

So, for now, I believe I’ll use the 2nd method…by keeping an eye on
org-mode plugin.


Sincerely,
Gour

--
You have a right to perform your prescribed duty, but you
are not entitled to the fruits of action. Never consider
yourself the cause of the results of your activities,
and never be attached to not doing your duty.

Andy Cowling

unread,
Oct 18, 2016, 7:25:44 AM10/18/16
to nikola-...@googlegroups.com
I use the Nikola org plugin which works great. I am familiar with
org-export but, as Roberto says, that's another step and far too much
work.

In fact, the native use of orgmode in Nikola was a key feature that made
me move (from Jekyll).

Saša Janiška

unread,
Oct 18, 2016, 10:47:45 AM10/18/16
to nikola-...@googlegroups.com
Andy Cowling <andy...@gmail.com> writes:

> I use the Nikola org plugin which works great. I am familiar with
> org-export but, as Roberto says, that's another step and far too much
> work.

I agree, but in the test which I performed, ox-nikola produces
better/correct result.

> In fact, the native use of orgmode in Nikola was a key feature that made
> me move (from Jekyll).

I’ve some other key features, but Nikola is such a nice piece of
software overall.


Sincerely,
Gour

--
The embodied soul may be restricted from sense enjoyment,
though the taste for sense objects remains. But, ceasing
such engagements by experiencing a higher taste,
he is fixed in consciousness.

Roberto Alsina

unread,
Oct 18, 2016, 11:02:22 AM10/18/16
to nikola-...@googlegroups.com
On Tue, Oct 18, 2016 at 4:47 PM Saša Janiška <go...@atmarama.com> wrote:
Andy Cowling <andy...@gmail.com> writes:

> I use the Nikola org plugin which works great. I am familiar with
> org-export but, as Roberto says, that's another step and far too much
> work.

I agree, but in the test which I performed, ox-nikola produces
better/correct result.


Then let's improve it :-)
 

Saša Janiška

unread,
Oct 19, 2016, 3:53:24 AM10/19/16
to nikola-...@googlegroups.com
Roberto Alsina <ral...@kde.org> writes:

> Then let's improve it :-)

I agree. ;)


Sincerely,
Gour

--
As a lamp in a windless place does not waver, so the transcendentalist,
whose mind is controlled, remains always steady in his meditation on the
transcendent self.

Roberto Alsina

unread,
Oct 19, 2016, 4:04:24 AM10/19/16
to nikola-...@googlegroups.com
On Wed, Oct 19, 2016 at 9:53 AM Saša Janiška <go...@atmarama.com> wrote:
Roberto Alsina <ral...@kde.org> writes:

> Then let's improve it :-)

I agree. ;)


1st step: you say it was suboptimal, are there issues for it? For example, that nested footnote thing? Is org-mode generating correct HTML? Is it generating correct HTML that just looks bad in Nikola because of our CSS?

Should we have compiler-specific CSS? Currently we just have rst.css blindly applied on everything, which probably makes no sense at all.

Saša Janiška

unread,
Oct 19, 2016, 6:15:36 AM10/19/16
to nikola-...@googlegroups.com
Roberto Alsina <ral...@kde.org> writes:

> 1st step: you say it was suboptimal, are there issues for it?

Didn’t test much, but will do further test.

Is plugin-repo correct place to submit issues?

> For example, that nested footnote thing? Is org-mode generating
> correct HTML? Is it generating correct HTML that just looks bad in
> Nikola because of our CSS?

See https://github.com/getnikola/plugins/issues/181

> Should we have compiler-specific CSS?

No idea…

> Currently we just have rst.css blindly applied on everything, which
> probably makes no sense at all.

I’ve to take closer look at some of Nikola’s mechanisms in order to give
better answer…


Sincerely,
Gour

--
Bewildered by the modes of material nature, the ignorant fully
engage themselves in material activities and become attached. But
the wise should not unsettle them, although these duties are inferior
due to the performers' lack of knowledge.

Reply all
Reply to author
Forward
0 new messages