You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.
Feature request/discussion topic: I have a structure like the one below for each post, basically a JSON file with some metadata and a summary and body of the post in markdown. This is working great in that I'm able to write templates that put it all together nicely. I'm doing some client side rendering and would like to have the generate process output a JSON file for each post that combines the JSON that is there now with the transformed markdown included in it. This would enable the client side javascript to render or conditionally render the HTML. Example use case is in a small screen device show only summaries but in a large screen show full bodies of posts.
Any thoughts on supporting this case? Is it possible to hook into the generation process in a easy way to make this possible?
{
"title": "Hello World",
"thumbnail_image": "/assets/images/hello-world.png",
"summary": "<p>This is a great article</p>",
"body": "<p>This was in a markdown file, it is now HTML</p>"
}
The text was updated successfully, but these errors were encountered:
The negotiateContent function of the ContentHandler do actually provide an output as you suggest. That's what the renderer uses to when rendering pages.
I'm currently looking into exposing the functions of TempalteHandler and ContentHandler via a HTTP API. So they can also be used for client-side rendering as you suggest.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Feature request/discussion topic: I have a structure like the one below for each post, basically a JSON file with some metadata and a summary and body of the post in markdown. This is working great in that I'm able to write templates that put it all together nicely. I'm doing some client side rendering and would like to have the generate process output a JSON file for each post that combines the JSON that is there now with the transformed markdown included in it. This would enable the client side javascript to render or conditionally render the HTML. Example use case is in a small screen device show only summaries but in a large screen show full bodies of posts.
Any thoughts on supporting this case? Is it possible to hook into the generation process in a easy way to make this possible?
Example JSON:
Example combined JSON:
The text was updated successfully, but these errors were encountered: