summaryrefslogtreecommitdiffstats
path: root/lib/plugin.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-27 17:07:25 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-27 17:07:25 +0100
commit0e0a23b79484d98695ffa56fa9f885dffef86d36 (patch)
tree42a6f406b8c2e708f5717c238d94db79bc3dd17c /lib/plugin.js
parentd9329295d60a94a02719869f58abdc3da3535190 (diff)
downloadgitbook-0e0a23b79484d98695ffa56fa9f885dffef86d36.zip
gitbook-0e0a23b79484d98695ffa56fa9f885dffef86d36.tar.gz
gitbook-0e0a23b79484d98695ffa56fa9f885dffef86d36.tar.bz2
Add blocks from plugins to template engine
Diffstat (limited to 'lib/plugin.js')
-rw-r--r--lib/plugin.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/plugin.js b/lib/plugin.js
index 79da7d7..2af81c6 100644
--- a/lib/plugin.js
+++ b/lib/plugin.js
@@ -135,6 +135,11 @@ Plugin.prototype.getFilters = function() {
.value();
};
+// Normalize blocks and return them
+Plugin.prototype.getBlocks = function() {
+ return this.infos.blocks || {};
+};
+
// Test if it's a valid plugin
Plugin.prototype.isValid = function() {
var that = this;