Questions tagged [dust.js]

Dust stands as a powerful JavaScript templating engine.

Does DustJS configuration on the server side allow new lines without escaping them?

I am currently using DustJS in combination with ExpressJS and NodeJS. When ExpressJS renders my DustJS templates, it automatically escapes the new lines and white spaces. However, since I am incorporating JavaScript into my DustJS templates, I want to pre ...

Scenario-specific blueprints

I'm currently facing a challenge in incorporating logic into a dustjs template, and I find it challenging to integrate all the components seamlessly. Here is an example of the JSON data I have: { "names": [{ "name": "User 1", "isSir": ...

Can you explain the benefits of using Karken.js to enhance the security and scalability of Node.js applications?

After reviewing multiple presentations and slides discussing how PayPal utilizes Karken.js within its Node.js Stack for enhanced security, it seems that it also integrates well with dust.js. However, the pressing inquiry remains: is this simply a tool to ...

utilize a function to format text in dust.js style

I have created a JavaScript function that blurs text: function blurText(data) { var dataSplit = data.split(" "); var lastWord = dataSplit.pop(); var toBlur = '<span class="blur">' + dataSplit.join(" ") + '</span>&ap ...

Is it possible to retrieve the kraken configuration object within a dust template?

Here is my Kraken configuration stored in config.json: envConfig : { prod : { host : "....", desc : "..." }, qa : { host : "....", desc : "..." }, } I am wondering if I can access this information in my ...

Using dustjs-linkedin alongside express version 3

Attempting to integrate dustjs-linkedin with an express 3 project, encountering a persistent error: Error: Template name parameter cannot be undefined when calling dust.compile at Object.compiler.compile (/home/user/project/node_modules/dustjs-linkedin/li ...

Leveraging partials on their own

I am currently exploring the possibility of loading a partial in linkedin-dustjs without having to load its parent along with it. For instance, consider this partial (login.dust): {>layout/} {<content} <!-- Login Screen --> {/content} Th ...

Generating HTML output using a string representation with Express render template

My website is set up to make a GET request and retrieve templates stored on another server. Basically, my application sends a request to this server and receives the template as a response, which is in the form of a dust template string. What's the most e ...

Leveraging Dust.js LinkedIn templates within a Node.js framework alongside Express 3.x

I am struggling to understand how to implement the dustjs-linkedin templates in express 3.x #app.js var dust = require('dustjs-linkedin'); app.set('view engine', 'dust'); app.get('/test1', routes.test1); #./routes/test.js exports.test1 = functio ...

Using Express and Dust.js to render a list of data items in a view

Currently, my homepage displays the 6 oldest Story posts from MongoDB. Here is the query I use to retrieve data from Mongo: var query = Story .find({maxlines:10}) .sort({_id:1}) .limit(6); After querying the data, I p ...

Looking for a demonstration using dust.js or handlebars.js in a two-page format with express3.x and node?

Currently, I am in the process of selecting a templating engine to use. While I have come across numerous single-page examples utilizing template engines, I am specifically searching for a practical example that demonstrates handling two distinct pages whi ...