var marked = require('marked');

function TemplateParam(page, param) {
	this.page = page;
	this.site = page.site;
	this.root = page.site.root;
	for (var key in param) {
		if (key != 'page' && !this[key] && param.hasOwnProperty(key)) {
			this[key] = param[key];
		}
	}
}

TemplateParam.prototype.isActive = function(page) {
	return page == this._activePage;
};

TemplateParam.prototype.markdown = function(string) {
	return string ? marked(string) : '';
};

TemplateParam.prototype.render = function(template, page) {
	return (page || this.page)._renderTemplate(template, this);
};

module.exports = TemplateParam;
@@ -503,27 +503,84 @@
 mplate, page
-) %7B
+, param) %7B%0A%09for (var key in param)%0A%09%09this%5Bkey%5D = param%5Bkey%5D;
 %0A%09return (pa

Update TemplateParam