Closed sheldonhull closed 6 years ago
You sure you have the latest version of the theme and its assets (JS, CSS, etc.)? This was fixed in https://github.com/mmistakes/minimal-mistakes/commit/356c1eb0937ab514bda35662afb656e3c06fdeca
Hitting the search icon toggles the Algolia search box and focuses on it for the demo site... which is using the latest version of the theme.
Closing as you haven't upgraded to the latest version of the theme. Your main.min.js
is still using 4.9.0...
Update that to latest.
Thank you I converted over to the ruby gem approach and thought I had cleared out all contents required. I'll remove those culprits. Thanks for the quick help.
@mmistakes if you get a sec would you mind telling me if I'm doing some obviously wrong with this again? It's not working and I've spent hours trying to fix. I've verified my
Not sure why the button won't click! It's like I messed up something with the javascript, though I searched my entire repo (using remote gem) and couldn't find any code for search or algolia that might be in there.
If you have any ideas I'd appreciate it as I've sunk a lot of time in it, and I'm guessing it's something very simple I'm just clueless on.
Whatever you modified, you also removed main.min.js
from being included in the page. You need to load that script.
Without it, it's not going to toggle the search bar when you click the icon. That's why it's not doing anything for you.
I can see the div
s that have the search input and they work. If you can sort out adding back in the theme's main.min.js
script to toggle them, search works fine.
Thank you so much! I will figure out why it's missing. That's the help I needed. Much appreciated
I'm using remote theme and in your documentation I think it points towards this being included in the remote theme. Any tip on why I would be having an issue when I'm not providing that file in the first place? I thought I saw the reference as a resource in the header.
Found it!
Could you consider making the documentation put WARNING
notice on the following content:
Site scripts Add scripts to the
or closing elements by assigning paths to either head_scripts and/or footer_scripts. For example, to add a CDN version of jQuery to page’s head along with a custom script you’d do the following: https://mmistakes.github.io/minimal-mistakes/docs/configuration/#site-scripts
Per the following content I found in: https://github.com/mmistakes/minimal-mistakes/blob/22a9c523d6be13becc6fe0ed38b065e3489e498f/docs/_docs/17-javascript.md
Note: If you assign footer_scripts the theme's /assets/js/main.min.js file will be deactivated. This script includes jQuery and various other plugins that you'll need to find replacements for and include separately. {: .notice--warning}
I used that section as a reference and only now in searching the repo found out that the footer deactivates the main.min.js
Thanks again! Glad I finally have the solution after all this troubleshooting.
bundle update
.bundle exec jekyll build
.Environment informations
Expected behavior
When I click on search button, I expect the algolia search box to display AND the focus to be on the textbox to allow typing. The issue is no focus is set on Algolia search. I'm not sure what I could have included that would change this behavior as your demo page works and sets focus correctly.
Steps to reproduce the behavior
Production Site with Search enabled
I've tested a local updated build just now and the same behavior is happening.