aaranxu / tale-zola

Tala-Zola is a minimal Zola theme ported from the Jekyll theme Tale, helping you to build a nice and seo-ready blog.
https://tale-zola.netlify.app
MIT License
36 stars 21 forks source link

Pages with summaries generate invalid markup (nested <p>) in HTML output #6

Open nyanpasu64 opened 2 years ago

nyanpasu64 commented 2 years ago

Looking at the source code of https://tale-zola.netlify.app/, checking Math Typesetting, I noticed that the markup nests a wrapper

and the page's own

. This is invalid under HTML rules for some reason, and instead results in Firefox parsing it as an empty

(presumably extending to the first real

in the post), the post contents, then an empty

afterwards.

The best idea I have for fixing this is that you should edit templates/macros.html to remove the outermost

for posts with page.summary (which is HTML).

Alternatively is it possible to synthesize summaries from truncating posts, and properly close HTML tags, so you can remove striptags from the alternative path?