Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service worker not being injected #8

Open
Rubydesic opened this issue May 20, 2018 · 2 comments
Open

Service worker not being injected #8

Rubydesic opened this issue May 20, 2018 · 2 comments
Assignees

Comments

@Rubydesic
Copy link

Rubydesic commented May 20, 2018

I have followed the installations instructions of Option 1 and the plugin is installed

However, when I load any page, the service worker is simply not injected into it. There is no service worker at all <script> tag to be found. However, the sw-register.js file is produced as is workman in assets/js.

Any thoughts? If it is relevant, I am using the dactl theme

@jizusun
Copy link

jizusun commented Jun 26, 2018

@Rubyjunk

Are you experimenting with GitHub Pages or local Jekyll?

For me, the local Jekyll would successfully inject the service worker,
while the GitHub Pages would not.

This is because (according to Jekyll docs)

Plugins on GitHub Pages
GitHub Pages is powered by Jekyll. However, all Pages sites are generated using the --safe option to disable custom plugins for security reasons. Unfortunately, this means your plugins won’t work if you’re deploying to GitHub Pages.
You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files.

image

@Rubydesic
Copy link
Author

@jizusun Local jekyll with gitlab pages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants