-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Enable Gitbook search plugin #1897
Conversation
Is there something I can do to inspire greater confidence on deploying this change? |
@filoxo sorry for the delay here, i haven't had time to get to this. I'll test it and try to merge it asap. |
Huh, the menu thing is interesting. The documentation for collapsible-menu actually says that having the menu items closed is the expected behavior. https://github.com/rtCamp/gitbook-plugin-collapsible-menu#how-this-work
I also noticed it behaves the same way (all menu items collapsed) when navigating away from the "Introduction" page and back on the live site. I'll keep digging around and see if there's an option or config that will allow all menu items to be open by default, but would removing |
I don't mind the initial state so much, but i can't even click on the menus to expand them. Whatever it takes to make that happen would be great :-) |
I found that even if search isn't enabled, gitbook includes the search-lunr plugin by default (in the
After that error is thrown, the collapsible-menu plugin doesn't seem to be executed until the next page change event. I manually fixed this and ran the old version of the docs locally, and the menu collapses just like the new version does. But definitely, the menu should be clickable! I've tested this locally on latest Chrome, Firefox, and Safari on Mac, and on Windows 10 using Edge and IE11; and all of them work for me. Could you share which browser/version/platform you're using? As well as any console errors. The collapse-menu plugin uses jQuery so I wonder if some other error is being thrown and causing other plugins to fail. |
Safari on Mac - but I'm using When I use a local http server, things work, but it'd still be nice if the menus were collapsible/expandable without navigation - and the more I look at it, the more I think being initially expanded is the right choice. |
For the record, you're right - on the current site, |
Also, on the new site, i see twitter/facebook/share icons - let's remove those :-) |
The CSS also seems a bit different; the old site is a bit more compact (in a good way). |
I'm going to go ahead and decline this PR then, since it's introducing more changes than expected. I might try getting the old version working and see if I'm just dumb and can workaround the issues I'd noted in #1892 to avoid upgrading gitbook-cli. Enabling search will cause all menu items to be closed on initial navigation because the collapsible-menu plugin will work correctly. Unfortunately there is no config/setting that will achieve what you like without forking it, which I'd rather not do because I won't maintain it. I just wanted search-ability on the docs site. |
I’ll reopen this then and see what i can figure out. |
40cc703
to
0a17404
Compare
Closing my own stale PRs. |
I'm still hoping to get back to this; hopefully it's ok that it remains open. |
2227326
to
0d5ead7
Compare
@filoxo unfortunately by deleting the fork this PR is unrecoverable :-( i wish you hadn't done that. |
Resolves #1892 by enabling the Gitbook search plugin.
There is a risk that upgrading to the latest version of gitbook-cli may break building the docs (see GitbookIO/gitbook-cli#74) but as I understand the issue, since this won't be changing the version of gitbook (only the gitbook-cli) I'm hopeful that the previously mentioned issue won't arise here.