The project I'm working on uses the template system Handlebars.js. It reads the content and when compiling the template, if necessary, adds the content:
<div class="content"> <p>lorem ipsum</p> {{{ content }}} </div>
In this case, the rudders are compiled using a JS object that has a content property that is a string of text or HTML (hence, triple brackets).
However, it is possible that the value of the content (being text or HTML) may also include steering wheel interpolation code:
var contentPassedToHandlebars = { content: '<p>{{ foobar }}</p>', foobar: 'foo' };
<p>{{ foobar }}</p> currently being issued, but what I would like to receive is <p>foo</p> .
Do rudders have tools for this nested content, or do they need a special assistant? ( {{{custom_parse content}}} )?
In the context of this issue
The situation obtained from the assembly system (metalmith), which reads as markdowns in files, converts them to HTML, appends the result to the content property of the file object, and then analyzes the rudder template, which injects file.content into it. All this and I hoped that there was a decision to put manual or string interpolations in markdowns so that label files could have access to the same variables that templates had access to (obviously, more global values ββin config.json , and not values ββrelated to created file object).
source share