fermyon / bartholomew

The Micro-CMS for WebAssembly and Spin
https://bartholomew.fermyon.dev/
Apache License 2.0
413 stars 50 forks source link

render markdown body only on request #177

Open karthik2804 opened 1 year ago

karthik2804 commented 1 year ago

This PR adds a new handlebars helper render_markdown.

This helper allows us to conditionally render the markdown in the body which helps with rendering performance as we currently render the entire set of pages when indexed on each rendering.

This would be a breaking change wherein occurrences of

{{{ page.body }}}

would need to be replaced by

{{{ render_markdown page }}}