emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] RFC: Proposal for an Org Special Block for ox-html


From: Kaushal Modi
Subject: Re: [O] RFC: Proposal for an Org Special Block for ox-html
Date: Fri, 25 May 2018 11:09:10 -0400

Hi Aaron,

On Fri, May 25, 2018 at 10:19 AM Aaron Ecay <address@hidden>
Iʼm not sure I made myself clear in the previous message.  In any case,
this org:

╭────
│ #+attr_html: :open t
│ #+begin_details
│ #+begin_summary
│ Open for details

│ More summary.
│ #+end_summary
│ Many details here.
│ #+end_details
╰────

exports to this HTML (using current-ish master with no additional
modifications beyond the tweak to org-html-html5-elements):

╭────
│ <details open="t">
│ <summary>
..│ </details>
╰────

No, sorry, you were clear. I just wanted to have the exported HTML to be clean, i.e. not have that '="t"' portion. That said, I agree that it is just easier to just do that in ox-html.
 
which displays in the open state in a browser (in any event, in Chromium
66).  So I think what you want already exists for this feature.

Thanks for checking that.


What is wrong with:

#+attr_html: :style color:red;
- red list 1
- red list 2

?

Nothing :) My implementation though needs those divs as I want to assign classes and styles to Markdown blobs.
 
That works in vanilla org today (exporting to html), without needing to
generate extra “style” and “div” elements.

Agree.


I looked at the file briefly.  I had trouble determining what might
represent missing features in ox-{html,md}, and what was included to
work around quirks in a particular implementation of markdown.

Your assessment is correct.. ox-blackfriday is mainly to make things Just Work with the Go Blackfriday markdown parser.. and thus all that lives in that separate library. In addition, it adds the missing pieces that raw HTML provides like assigning styling to various blocks, etc.
 
I donʼt understand why you are bothering with markdown at all
in your usecase.  If it was me, I would just generate HTML from org and skip the markdown step entirely.

I gave a lot of thought whether I should export to HTML or Markdown. In the end, I am a fan of committing stuff that is readable. So it boiled down to my personal preference. I prefer to commit Markdown instead of HTML. It's very easy to track the corresponding changes from Org to Markdown, than rather from Org to HTML.

Also, the ox-hugo exported Markdown is easy for collaborating documentation with other folks (e.g. I contributed to official Hugo documentation using ox-hugo exported Mardown.. I get to write the doc in Org, and they get the Markdown doc source.. everyone is happy).

But then I also wanted to mask all the shortcoming of Markdown. So ox-hugo helps bridge that gap by filling in HTML snippets only where needed. I hope that makes sense.

It seems to me like you could get rid of ox-blackfriday, leaving behind
only a small ox-html-plus-plus containing whatever QOL improvements to
the vanilla html backend suited your taste (and that of ox-hugoʼs users).

That's a possibility. But as I said above, there isn't a strong reason to have Hugo blog post source in HTML.

If the set of QOL improvements is empty, then the custom backend would disappear entirely.  Less code for the same features = maintenance win in my book.  YMMV of course...

Thanks.
--

Kaushal Modi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]