This is work in progress and while many parts are already working, some changes to the setup will occur. Please watch the releases of this repository to be alerted about changes.
|Add this module|
[[module.imports]] path = "github.com/davidsneighbour/hugo-pwa" disable = false ignoreConfig = false ignoreImports = false
|Latest Version||v1.0.10 (2022-11-15)|
|Fix to this version||
hugo mod get github.com/davidsneighbour/[email protected]
- ✔️ Favicon for apps and sites
- ✔️ simple PWA setup
- ❌ Happy Google lighthouse testing
- ❌ Improvements for easier “drop in” to other websites/modules
- ❌ Add layout system for offline page creation
- ❌ Add configuration system
- ❌ improve configuration of implemented functionality in the service worker
- ❌ add detailed documentation for all configuration options
To make this component work you need to add the manifest to your home output formats in
You already should have an
[output] section, add
"manifest" to it. Do not add it anywhere other than in the
In your themes header (before
This will add a link to the automatically created webmanifest with options to install the PWA. Check Detailed configuration for information how to configure the contents of this file.
In your footer layout (before
This will set up the service worker script in the footer of your website.
- both layouts can be cached and contain no page-individual information
- check out the todo section of the readme for missing parts or open an issue.
… to be written …
Hugo itself will check on a regular base for updates. To force an update of this module run one of the following commands on your CLI.