diff --git a/README.md b/README.md index 12c3c50..6eb214d 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,16 @@ Change the mongo url to your mongodb npm start - http://localhost:8000/index.html +[/index.html](http://localhost:8000/index.html) Import content defined in index.html into db: - http://localhost:8000/importer/index.html +[/importer/index.html](http://localhost:8000/importer/index.html) + Dogfood viewing of index.html from db: - http://localhost:8000/page/app/main.index.html +[/page/app/main.index.html](http://localhost:8000/page/app/main.index.html) # Features: diff --git a/preview.js b/preview.js index 87319a3..123b510 100644 --- a/preview.js +++ b/preview.js @@ -174,13 +174,14 @@ module.exports = function (config, mongoDataInstance) { var attribute = { collection: parts[1], name: parts[2], - attribute: parts[3] + attribute: parts[3], + query: { name: parts[2] } }; return mongoDataInstance.getMongoAttribute(attribute, function handleMarkdownContent(err, markdown_result) { if (err) { return callback(err); } - var html = markdown.toHTML(markdown_result[options.attribute]); + var html = markdown.toHTML(markdown_result[attribute.attribute]); return callback(null, { regExp: new RegExp(result, 'gmi'), value: html diff --git a/public/index.html b/public/index.html index 0041d12..c595b2e 100644 --- a/public/index.html +++ b/public/index.html @@ -55,6 +55,7 @@ +