diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-05-23 17:45:46 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-05-23 17:45:46 +0200 |
commit | 47fdd7379179580855cfac8826295cc1cdcb2313 (patch) | |
tree | b55f4e95179cecff4b9ec77154eadbb54bf35efd | |
parent | 7c0b88cf2e1615e6c9e889052dbda31c3f8ad3f1 (diff) | |
download | gitbook-47fdd7379179580855cfac8826295cc1cdcb2313.zip gitbook-47fdd7379179580855cfac8826295cc1cdcb2313.tar.gz gitbook-47fdd7379179580855cfac8826295cc1cdcb2313.tar.bz2 |
Fix cache manifest in the html tag
Serve command disable cache
-rwxr-xr-x | bin/gitbook.js | 2 | ||||
-rw-r--r-- | theme/templates/site.html | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/bin/gitbook.js b/bin/gitbook.js index 84f5a8f..f79efae 100755 --- a/bin/gitbook.js +++ b/bin/gitbook.js @@ -27,7 +27,6 @@ build.command(prog.command('serve [source_dir]')) .description('Build then serve a gitbook from a directory') .option('-p, --port <port>', 'Port for server to listen on', 4000) .option('--no-watch', 'Disable restart with file watching') -.option('--no-cache', 'Disable cache manifest generation') .action(function(dir, options) { var server = new Server(); @@ -46,6 +45,7 @@ build.command(prog.command('serve [source_dir]')) server.stop() .then(function() { return build.folder(dir, _.extend(options || {}, { + cache: false, defaultsPlugins: ["livereload"] })); }) diff --git a/theme/templates/site.html b/theme/templates/site.html index a05cf4b..b0a2ba4 100644 --- a/theme/templates/site.html +++ b/theme/templates/site.html @@ -1,10 +1,6 @@ {% extends "layout.html" %} -{% block htmlTag %} - {% if options.cache %} - manifest="{{ basePath }}/manifest.appcache" - {% endif %} -{% endblock %} +{% block htmlTag %}{% if options.cache !== false %}manifest="{{ basePath }}/manifest.appcache"{% endif %}{% endblock %} {% block title %}{{ progress.current.title }}{% parent %}{% endblock %} {% block content %} <div class="book" {% if githubId %}data-github="{{ githubId }}"{% endif %} data-level="{{ progress.current.level }}" data-basepath="{{ basePath }}" data-revision="{{ revision }}"> |