themefisher / bookworm-light-astro

Bookworm Light is a feature-rich, minimal, highly customizable, easy-to-use Astro blog theme.
https://themefisher.com/products/bookworm-light-astro
MIT License
236 stars 61 forks source link

Post preview / excerpt does not render as markdown #16

Closed selipso closed 4 months ago

selipso commented 4 months ago

The problem stems from the following line in src/layouts/Posts.astro: post.body?.slice(0, Number(i === 0 && fluid != false ? summary_length * 2 : summary_length))

This is plain markdown that is shown directly, so if there is any kind of syntax like a heading or link early on in the post, it will look ugly in the preview. My suggestion is to use a generic mardown parser that is compatible with astro like astro-remote to parse the content and show the post preview properly in the list of Posts.

I can submit a PR if you think this is a good approach?

tfsomrat commented 4 months ago

Hey @selipso, we fixed that issue. thanks