Hi Aaron,

I just went ahead and removed that "---" syntax from ox-hugo. Updated links:

1. https://ox-hugo.scripter.co/doc/details-and-summary/
2. https://ox-hugo.scripter.co/test/posts/details-and-summary/

(it was easy as I had committed that feature just yesterday.)

On Thu, May 24, 2018 at 3:08 PM Aaron Ecay <aarone...@gmail.com> wrote:

>
> Is it important for open to be a “bare” attribute (not sure of the
> official name) like “<details open>” as opposed to “<details
> open="open">”?


I'm not so sure.. I just followed the documentation here:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details#Creating_an_open_disclosure_box


> The latter form is already supported (in fact the second
> “open” can be any string).  Just add
>
> #+attr_html: :open any-string-you-want
>

I know, but I did not test that.. just thought of doing as in that example
in the mozilla documentation.

That's why I am using (org-element-property :attr_html special-block) in
the code to get the raw values to #+attr_html.


> The only thing I know off the top of my head is that CSS can be quite
> hairy,


Heh, of course :)


> so I would not be surprised if this wrapper is sometimes needed.
> And indeed, support for it would be missing.



> Is it something that is
> likely to crop up for other elements as well, such that it would be
> desirable to support it in org core?


That would be great. I myself wasn't sure if I should bring that up to Org
core.. I had just implemented #+attr_css support for ox-hugo.

It looks like this:

#+attr_html: :class red-text
#+attr_css: :color red
- Red list item 1
- Red list item 2

Above will generate <style .red-text { color: red; } </style><div
class="red-text">..</div>, with that list in the div.

You can find many such examples in
https://kaushalm...@github.com/kaushalmodi/ox-hugo/blob/master/test/site/content-org/all-posts.org,
and the implementation in
https://github.com/kaushalmodi/ox-hugo/blob/master/ox-blackfriday.el. Let
me know what you think if you have a chance to review those.


-- 

Kaushal Modi

Reply via email to