Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render markdown body only on request #177

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

karthik2804
Copy link
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 }}}

@karthik2804 karthik2804 force-pushed the index_conditional_rendering branch from ffc403d to 52c3341 Compare July 15, 2023 00:05
Copy link

@tschneidereit tschneidereit left a comment

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

src/template.rs Outdated Show resolved Hide resolved
Signed-off-by: karthik2804 <[email protected]>
@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