Add a Service Worker and an offline page#234
Conversation
|
I am not sure that this is in keeping with the spirit of having a minimal theme. |
|
It probably isn't (in a strict sense), but this seems like a lighter-weight solution compared to using a module like Workbox. Although I've used that on a small site and it does the job well, it would require people to deal with NPM. That isn't difficult, but it is a bit heavy in terms of dependencies. As previously mentioned, this is probably something for 3.0, so I'm happy to wait on this for a while. |
|
Thanks @chrisfinazzo I'd really much like if we could provide a better user experience and allow offline browsing for minima. Shouldn't we add a timestamp to the |
|
@chrisfinazzo we don't want any |
|
Going offline by @adactio is out today, let's read it and make sure we have a solid strategy here 😉 |
|
@DirtyF I read it this afternoon, so this was on my mind 😃. To your point regarding a timestamp on the To be honest, the section on caching is a bit dense, so I probably need to spend a bit more time thinking about what the right thing to do is. |
|
@chrisfinazzo I was thinking of something like:
|
|
@DirtyF Ah, I see now. Will update. |
|
This would be a nice addition. Thanks for working on adding it.
|
|
Thanks for the feedback. I have a branch in my local repo that has some of the changes you mentioned, I will review there and then add those to this PR. |
In GitHub Pages environments, the custom |
|
I had suggested:
According to Google's primer on Service Workers that wouldn't really work.
It seems it would need to live at the root directory.
This name is cryptic, but I suppose it is the standard name for this kind of thing. |
Based on the discussion in #149, I took another crack at this. As the aim of Minima is to show what unmodified Jekyll looks like (E.g,
jekyll start), I cached files based on the contents oflib/site_template.For a 3.0 release (#145), this seems like a reasonable thing to include.