Skip to content

render markdown body only on request - #177

Open
karthik2804 wants to merge 2 commits into
fermyon:mainfrom
karthik2804:index_conditional_rendering
Open

render markdown body only on request#177
karthik2804 wants to merge 2 commits into
fermyon:mainfrom
karthik2804:index_conditional_rendering

Conversation

@karthik2804

Copy link
Copy Markdown
Contributor

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 }}}

Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
@karthik2804
karthik2804 force-pushed the index_conditional_rendering branch from ffc403d to 52c3341 Compare July 15, 2023 00:05

@tschneidereit tschneidereit left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I would prefer someone with more knowledge of the system sign off on this

Comment thread src/template.rs Outdated
Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
@karthik2804
karthik2804 force-pushed the index_conditional_rendering branch from 3c6c04a to 449fa08 Compare July 15, 2023 00:21
@karthik2804
karthik2804 requested a review from radu-matei July 15, 2023 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants