https://github.com/aeharding/metalsmith-offline
A metalsmith plugin for making your static website work offline.
https://github.com/aeharding/metalsmith-offline
Last synced: 5 months ago
JSON representation
A metalsmith plugin for making your static website work offline.
- Host: GitHub
- URL: https://github.com/aeharding/metalsmith-offline
- Owner: aeharding
- License: mit
- Created: 2016-08-18T01:12:56.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-18T22:54:08.000Z (almost 10 years ago)
- Last Synced: 2026-03-02T01:21:36.373Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# metalsmith-offline
A metalsmith plugin to make your metalsmith website work offline.
Uses application cache manifest.
PRs welcome to get this to use a hybrid of service workers falling back to application cache.
> **Warning:** To prevent bugs, try to add this as the last plugin in your metalsmith pipeline.
## Installation
```
npm install --save metalsmith-offline
```
## CLI Usage
```
{
"plugins": {
"metalsmith-offline": {
"trailingSlash": false
}
}
}
```
## Javascript API
```javascript
var offline = require('metalsmith-offline');
metalsmith.use(offline({
trailingSlash: false
}));
```
## Options
### `trailingSlash`
False by default.
If true, offline-enabled URLs will have trailing slashes
In example:
`/blog/` would be valid, but `/blog` would not be.