Skip to content

GregCornis/hugo-pwa-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hugo PWA Demo

This is a simple demo to illustrate how to turn a Hugo Website into a Progressive Web App.

This means that your website can be installed by you users, on the desktop (Chromium only) or their mobiles, and even be used offline. That's pretty powerful, especially for static websites built with Hugo!

To reproduce

There are just a few steps to take:

  1. Add a manifest.json file to /static, which describes your PWA. Here is a more thorough description of the file and its content.
  2. Add a link to the manifest in all your HTML pages. The easiest is to add it to layouts/partials/head-additions.html as done here
  3. Add a Service Worker, which will handle the behavior of the app. Here, the worker is simply responsible for caching the pages, and serving them when the app is offline. Credits to offline-first-sw
  4. Register the worker. See the <script> in head-additions.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published