Browse Source

Add norm for adding html snippets

Samy Pessé 10 years ago
parent
commit
106dd7f3e7
2 changed files with 15 additions and 2 deletions
  1. 8 1
      README.md
  2. 7 1
      index.js

+ 8 - 1
README.md

@@ -27,7 +27,7 @@ The package.json should contain a `engine` field using [the standard norm](https
 }
 ```
 
-For example if you want your plugin to supports only GitBook version supperior to 0.3.1: 
+For example if you want your plugin to supports only GitBook version supperior to 0.3.1:
 
 ```
 "engines": {
@@ -65,6 +65,13 @@ Default value: `[]`
 
 List of css file to add to the html pages (relative to the assets fodler).
 
+#### "book.html"
+
+Type: `Object`
+Default value: `{}`
+
+Map of position -> code, html snippets to add to each page.
+
 #### "book.templates"
 
 Type: `Object`

+ 7 - 1
index.js

@@ -6,7 +6,13 @@ module.exports = {
         ],
         css: [
             "test.css"
-        ]
+        ],
+        html: {
+            "head:start": "<!-- head:start -->",
+            "head:end": "<!-- head:end -->",
+            "body:start": "<!-- body:start -->",
+            "body:end": "<!-- body:end -->"
+        }
     },
     hooks: {
         // For all the hooks, this represent the current generator