-
Notifications
You must be signed in to change notification settings - Fork 25.4k
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
Question about adding a JavaScript plugin #1494
Comments
Yes, the If you want to build your own local version of The other option... and possibly less performant since the scripts won't be concatenated is to use the This way you can just drop in your custom JS into footer_scripts:
- /assets/js/your-custom-footer-script.js The only gotcha here is you using this requires you to list out all of the scripts the theme uses by default because it disables It would end up being something like: footer_scripts:
- /assets/js/vendor/jquery/jquery-3.2.1.min.js
- /assets/js/plugins/jquery.fitvids.js
- /assets/js/plugins/jquery.greedy-navigation.js
- /assets/js/plugins/jquery.magnific-popup.js
- /assets/js/plugins/jquery.smooth-scroll.min.js
- /assets/js/plugins/_main.js
- /assets/js/your-custom-footer-script.js |
Thank you! I think I'm still missing something. Jekyll doesn't seem to be able to see anything I add to the assets/js folder - just the files coming from the remote theme. If I go to http://localhost:4000/assets/js/plugins/ in my browser I see the files from the theme, but not the one I have added, although I can see it in the proper folder in Windows Explorer. |
@mmistakes Thank you. I'm trying again (from the beginning) but now I'm running into the error jekyll 3.6.2 | Error: Peer certificate cannot be authenticated with given CA certificates when running It looks like you had the same problem here: benbalter/jekyll-remote-theme#9 Were you able to resolve it? |
No I never figured it out. I only use Windows for testing so I gave up trying to get the remote theme gem to work there since my primary computer is macOS based. Might be worth adding to that issue as I assumed it was some weird bug only I was hitting. |
Will do, thanks! |
bundle update
.bundle exec jekyll build
.Environment informations
Expected behavior
I am upgrading from an old version to the gem-based version of the theme now that Github Pages supports it. Everything seems to be fine except I'm having trouble adding a plugin.
I have added the file to assets/js/plugins, and added the path to package.json as specified here: https://mmistakes.github.io/minimal-mistakes/docs/javascript/ This was pretty much the same as I did with the old version of the theme.
But when I run
npm run build:js
I get the error ERROR: can't read file: assets/js/vendor/jquery/jquery-3.2.1.min.js Do I need to have a local copy of the theme's JS files for Node to see them?The text was updated successfully, but these errors were encountered: