Closed jwodder closed 4 years ago
Hi @jwodder. Is this issue something you would be willing to help out with? We could really use the assistance! 😅
@justinmayer My suspicion about how to fix the problem turned out to be correct; I have submitted a patch as PR #9.
@jwodder: Many thanks for fixing this! Addressed via https://github.com/pelican-plugins/render-math/commit/93f53605d47163bcb4d73631f1719ffb39f1fb92 and released as Render Math 1.0.2.
After
process_summary()
is called on an article,article.summary
remains the same, even if it contains mathematics. I believe the problem is thatarticle._summary
isn't used by any code paths after you set it; perhaps you should setarticle.metadata["summary"]
instead.This gist serves as a demonstration of the bug. Use it as follows:
pelicanconf.py
and witharticle.rst
placed incontent/
.pelicanconf.py
setsTHEME = 'simple'
. This is needed to get a theme that shows the summary for the most recent article.requirements.txt
into it.math.diff
to{virtualenv}/lib/python3.8/site-packages/pelican/plugins/render_math/math.py
. This adds some debugging output to pelican-render-math so we can see the value ofarticle.summary
before and after processing.pelican
in the virtualenv. You will see this output:Note that the summary remains the same. Also note that MathJax is not present in
output/index.html
.