GithubHelp home page GithubHelp logo

souldanger / jekyll-pwa-workbox Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 2.0 1.57 MB

A Jekyll plugin using Workbox to make your PWA / Website available offline.

Home Page: https://rubygems.org/gems/jekyll-pwa-workbox

License: MIT License

Ruby 80.63% JavaScript 19.37%
jekyll jekyll-plugin offline-first progressive-web-app pwa ruby service-worker workbox

jekyll-pwa-workbox's People

Contributors

souldanger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jekyll-pwa-workbox's Issues

Is it possible to send notifications to users

Hi,
If I enabled this plugin in my site, will it prompt user to allow or deny to notification like below
image
Or how can I send notifications to subscribed/installed users? Does user need to install this by clicking A2HS prompt to get notifications? I am totally new to this, hence the confusion...

Combine with other sw.js file?

Hi, thanks for making this plugin. I have already a service worker file for onesignal. can I put this plugin's service worker js code in sw.js file of that or can I use as a separate one.

UndefinedConversionError (but only when running on remote server)

So I build my Jekyll site on Github using a GitHub Action. When I test it locally, it compiles without a hitch. And when I only enable the PWA for my small recipes folder, it runs fine in both places.

But when I enable it for the drinks section I have, it breaks, but only when I run it on the GitHub Action (running ubuntu). it builds just fine on my local machine (Mac OS).

I think this might be how to fix it: https://stackoverflow.com/questions/23309669/ruby-encode-xc3-from-ascii-8bit-to-utf-8-encodingundefinedconversionerr/23382078

but I'm not sure if that means changing the code in the plugin or if I need to do something in the GitHub Action.

/github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-pwa-workbox-5.1.41/lib/jekyll-pwa-workbox.rb:89:in `to_json': "\\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
155
jekyll 3.9.0 | Error:  "\xC3" from ASCII-8BIT to UTF-8

Support for scope in navigator.serviceWorker.register

Hi,

I ran into an issue when I changed the path of the sw_dest_filename to assests/js or any other sub folder. He issue was that the scope of the webmanifest was not the same as the scope of the service worker.
The scope of the webmanifest was set to "/", but the service worker was on "/assests/js/".

When registering a service worker it is also possible to pass the scope via the options parameter of navigator.serviceWorker.register, see https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register.

If found a good explanation on https://dev.to/njromano/how-to-scope-your-pwa-service-workers-1n6m.

Would it be possible to add it to the lib? Or would you accept a pull request?

Regards,

Jochen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.