Here's a simple reST snippet:
deleting this line causes all subheadings to be rendered as h1 tags
I should be an h1
=================
I should be an h2
-----------------
foo
I should also be an h2
----------------------
foo
and here's a demonstration of it being rendered:
with initial line: http://rst.ninjs.org/?n=ff67380d732a33c7844f350c240804d0
without initial line: http://rst.ninjs.org/?n=550ea2c1b4233affdce1d158c5dc4d99
I'm rendering reST using the following Python:
from docutils.core import publish_parts
parts = publish_parts(rest_content, writer_name="html")
html_snippet = parts['html_body']
How do I get subheadings (specifically, <h2>
tags) without the initial line? Do have provide two levels of hierarchy above the subheadings? Naively providing a page header doesn't help: http://rst.ninjs.org/?n=e874f6eaad17c8ae7fd565f9ecb2212b