Hi all,

We use Sphinx to build the Symfony framework documentation written with 
reStructuredText (source docs repository: 
https://github.com/symfony/symfony-docs/).

We've defined a custom directive for the sidebars:

.. sidebar:: The title of the sidebar

    The content of the sidebar ...


This is the node visitor that we use to process that directive:

def visit_sidebar(self, node):
    self.body.append(self.starttag(node, 'div', 
CLASS=('admonition-wrapper')))
    self.body.append('<div class="sidebar"></div>')
    self.body.append('<div class="admonition admonition-sidebar">')
    self.set_first_last(node)
    self.in_sidebar = 1


And this is the output that we get:

<div class="admonition-wrapper">
  <div class="sidebar"></div>
  <div class="admonition admonition-sidebar">
    <p class="first sidebar-title">
      The title of the sidebar
    </p>

    The content of the sidebar ...
  </div>
</div>

Instead, we would like to add <h3> headings to the title of the sidebars. 
Something like this:

<div class="admonition-wrapper">
  <div class="sidebar"></div>
  <div class="admonition admonition-sidebar">
    <h3>
      The title of the sidebar
      <a title="Permalink to this headline"
         href="#the-title-of-the-sidebar"
         class="headerlink">
        ΒΆ
      </a>
    </h3>

    The content of the sidebar ...
  </div>
</div>


Could any Sphinx expert please guide us to achieve this? Thanks!

Regards,
Javier Eguiluz

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to