Extension of the first container to display additional div attributes

I am starting to use a pelican with the reStructuredText representative format rst. I have custom javascript (jQuery) things that I would like to control with div attributes such as data-default-tpl="basename"with nested content.

What to renew and what. I looked at Directivesand nodes, but I just can’t plunge into my head how to do it.

.. rstdiv:: class1 class2 
    :name: namessid
    :extra: thisIsMyextra

    .. rstdiv:: nested class3
        :name: nestedid  
        :extra: data-default-tpl="basename"

        some text

.. container:: This is normal rst container 
    :name: contid

    text

From rst to html with pelic.

<div id="nameisid" class="class1 class2" thisIsMyextra>
<div id="nestedid" class="nested class3" data-default-tpl="basename">
some text
</div>
</div>
<div id="contid" class="container This is normal rst container">
text
</div>
+4
source share
1 answer

I'm not sure about this ... html rst directive plugin may work

-1
source

Source: https://habr.com/ru/post/1541735/


All Articles