Pelican not rendering rst title and subtitle from imported rst file

131 Views Asked by At

I want to import an rst file to my Pelican index page like here: Pelican: include file's contents on main page

*****
Title
*****

subtitle
########

subsubtitle
***********

Here is some content in the document.
**ReStructuredText** (rst): plain text markup

.. image:: images/22204100065.png
   :alt: exhale
   :width: 512px

only from subsubtitle gets the page rendered as html. The source of the index.html looks like this

<div class="bg-white dark:bg-zinc-800 p-4 md:p-6 mb-4 rounded-lg"><div class="section" id="subsubtitle"> <h2>subsubtitle</h2> 

Here is some content in the document. ReStructuredText (rst): plain text markup

The start of the index.html template looks like this:

{% extends "base.html" %}

{% block content %}

{% block content_title %}
<div class="bg-white dark:bg-zinc-800 p-4 md:p-6 mb-4 rounded-lg">{{ INTRO }}</div>
{% if not category and not tag %}
<div class="my-12 md:my-24 text-zinc-800 dark:text-zinc-300">

  {% if SOCIAL or FEED_ALL_ATOM or FEED_ALL_RSS %}

The part of my settings file looks like this (from the answer of above link):

from pelican.settings import DEFAULT_CONFIG
from pelican.readers import RstReader
config = DEFAULT_CONFIG.copy()
INTRO, _ = RstReader(config).read("content/incls/sample.rst")

I expect the Title be rendered in h1 and the Subtitle in h2.

I am using the Papyrus theme. Update: I also tried with notmyidea but have the same problem.

I tried to ask the question in a comment of the above link but I am not allowed.

0

There are 0 best solutions below