5

I'm starting to use pelican with reStructuredText rst page format. I have custom javascript (jQuery) things that I'd like to control with div attributes like data-default-tpl="basename" with nested content.

What to extend and what. I've looked at Directives and nodes, but I just can't wrap my head around 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 pelican.

<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>
Manwe
  • 401
  • 2
  • 11
  • I've found a solution that is not perfect. I'll write it here as an answer as soon as I have enough spare time to clean it up. – Manwe Jun 02 '14 at 09:53

1 Answers1

-1

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

Lonewolf
  • 497
  • 5
  • 13
  • 1
    Using html rst plugin misses the point and writing html is exactly what I'm trying to avoid. – Manwe Jun 02 '14 at 09:54