-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Attempt to add search functionality #86
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zkamvar
added a commit
to carpentries/sandpaper
that referenced
this pull request
Aug 1, 2023
This complements carpentries/varnish#86
Adjust autocomplete dropdown CSS to maintain readability
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to address the search problem. This is paired with carpentries/sandpaper#495. It is most certainly not ready
To configure a lesson to test this (do not put this in production), fork it, and then add these lines to your config.yaml:
A current test lesson can be found at https://zkamvar.github.io/instructor-training/
2023-08-01
Test this out with carpentries/sandpaper@enable-search and carpentries/varnish@use-search-2023
I'm testing this in my fork of instructor training and I'm getting an error:
https://github.com/zkamvar/instructor-training/actions/runs/5732665782/job/15536034405
2023-08-02
Here is a demo (as of 2023-08-02, it works minimally): https://zkamvar.github.io/instructor-training/
One of the big challenges is that I built this using the "bootstrap 3" architecture of {pkgdown}. It now has an option to use bootstrap 5 where it expands the theming option so that people like me don't have to create new pkgdown templates to work.
The thing is, the switch between bs 3 and 5 is spread across the pkgdown infrastructure: https://github.com/search?q=repo%3Ar-lib%2Fpkgdown%20bs_version%20%3E%203&type=code
I've been able to get a basic search running and it works to a degree, but it is frustrating when certain terms do not show up. For example, if you search "pronouns" in instructor training, it says nothing showed up even though it's one of the names that's covered. This is because the code to make a page index searches for divs of class "section", but our callout divs are not "sections, so they aren't included in the index.
One way to address this is to add the "section" class to the callouts, but I'm not sure if that's appropriate. EDIT: I went ahead and applied the change in the sandpaper branch, but we'll see if it works.