How to use the consolidate.pug function in consolidate

To help you get started, we’ve selected a few consolidate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cfsghost / lantern / renderer_worker.js View on Github external
// Redirect
		if (page.redirect) {
			result.push('D');
			result.push(page.redirect);
			process.send(result.join(''));
			return;
		}

		// Using service name by default
		if (!page.state.Window.title) {
			page.state.Window.title = settings.general.service.name;
		}

		// Rendering page
		consolidate.pug('views/index.pug', {
			cache: true,
			title: page.state.Window.title,
			content: page.content,
			window: page.state.Window,
			state: JSON.stringify(page.state)
		}, function(err, html) {

			result.push('C');
			result.push(html);
			process.send(result.join(''));
		});
	});

consolidate

Modern and maintained fork of the template engine consolidation library. Maintained and supported by Forward Email <https://forwardemail.net>, the 100% open-source and privacy-focused email service.

MIT
Latest version published 5 months ago

Package Health Score

81 / 100
Full package analysis