funkydan2 / alpha-church

Hugo theme for churches based on a html5up theme
https://alpha-church.netlify.app
Other
67 stars 58 forks source link

Post preview doesn't show html correctly #40

Open anakinkinsey opened 2 years ago

anakinkinsey commented 2 years ago

I really like the list page created when multiple posts are in a subdirectory. eg I have a folder events with a md file per event and hugo creates an event directory at the /events path. A preview of the text is shown with each entry but the text doesn't seem to render css/html or shortcodes well, it just dumps the text content of them out. Is this a limitation? Or an incorrect use on my part of the auto-list page created at the root of a sub-directory. I apologize if this is explained in the documentation, or if its a hugo question I can search their forums.

funkydan2 commented 2 years ago

Great question.

I think this is code that creates that output.

https://github.com/funkydan2/alpha-church/blob/add6c09ce69c0cb949a7305d9db0eb13685c95e5/layouts/partials/listbody.html#L13

The .Summary is piped through the plainify function, which removes all formatting. It was long time ago when I wrote that code, but I think I did it because it was what I saw in other themes. Would you be able to experiment with what happens when you change that line and send through a Pull Request if you think it's helpful?