Skip to content

Commit 4963fda

Browse files
committed
add service worker info to README
1 parent 0efd71c commit 4963fda

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ bundle exec jekyll serve --watch --baseurl ''
3030
Open it up in your browser: <http://localhost:4000/>
3131

3232

33-
## _config.yml
33+
## `_config.yml`
3434

3535
Options within the `_config.yml` file allow you to control the site's title, subtitle, logo, author information, and the left column navigation.
3636

@@ -48,6 +48,24 @@ Sometimes it's nice to preview your Jekyll site before you push your `gh-pages`
4848

4949
This way, you can preview your site locally from the site root on localhost, but when GitHub generates your pages from the gh-pages branch all the URLs will start with `/project-name` and resolve properly.
5050

51+
## Offline support
52+
53+
By default DOCter provides offline support via a [Service Worker](http://www.html5rocks.com/en/tutorials/service-worker/introduction/). This means that after an initial load of your DOCter site, a cached version will be available offline in some modern browsers.
54+
55+
**To disable offline caching:**
56+
57+
in `_config.yml`: set `offline_cache` to false (defaults to true).
58+
59+
**To update the cached version of your site:**
60+
61+
in `_config.yml` change the value of `cache_name`
62+
63+
**To add additional pages or files to the cache:**
64+
65+
Update the `filesToCache` array in `sw.js`;
66+
67+
68+
5169
## License
5270

5371
The project is in the public domain, and all contributions to it will be released as such. By submitting a pull request, you are agreeing to waive all rights to your contribution under the terms of the [CC0 Public Domain Dedication](http://creativecommons.org/publicdomain/zero/1.0/).

0 commit comments

Comments
 (0)