3 var Mustache = require("lib/mustache");
4 var path = require("vendor/couchapp/lib/path").init(req);
6 var indexPath = path.list('index','recent-posts',{descending:true, limit:10});
7 var feedPath = path.list('index','recent-posts',{descending:true, limit:10, format:"atom"});
8 var commentsFeed = path.list('comments','comments',{descending:true, limit:10, format:"atom"});
13 blogName : ddoc.blog.title,
15 commentsFeed : commentsFeed
18 pageTitle : doc ? "Edit: "+doc.title : "Create a new post",
23 data.doc = JSON.stringify(doc);
24 data.title = doc.title;
26 data.tags = doc.tags.join(", ");
28 data.doc = JSON.stringify({
34 return Mustache.to_html(ddoc.templates.edit, data, ddoc.templates.partials);