-
Notifications
You must be signed in to change notification settings - Fork 1.2k
add search #3942
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
add search #3942
Conversation
largely based off instruction in their readme: https://github.com/pelican-plugins/search#installation considered using tipue_search but was marked as deprecated in the repo and suggested the search plugin this search also uses stork, which is written in rust! also just adding it to the main page, since i'm not sure if it'd be as useful on every article or any other page.
This actually looks great, even if a bit simple. We're still discussing as an editorial team, but I think as long as we add some guidance to the interface about what will and won't work, this would be a good option. Is that something you'd like to add, or would you like help with that? |
Couldn't a magnifying glass fit in the header, in I'm not equipped right now to try and modify it and frankly, not familiar enough with stylesheets so at best it would just be a hack. So it's just a suggestion, a search on the front page is already a great addition IMO, thanks for taking the time @ndd7xv. 🙂 |
@bennyvasquez I've been a little bit busy, but I'd still love to be able to help out! I think I can add guidance to the interface; would you be willing to describe what you're imagining it would look like, and what specific information it might specify? @blueglyph I honestly think this would be possible, but like you I'm not the most familiar with stylesheets (or Pelican, for that matter)! Both of the examples you pointed out use mdbook, which have that feature by default. I honestly just searched things up until I got a working search, but at this point I'm not sure if I have the time to make a change as big as that. I'm thinking that if this were merged, there might be value in creating another issue for moving search to the header because I could imagine users would want to search even if they're not on the main page. |
@ndd7xv for sure! In my mind, I'm seeing just a line of text under the 'Search' header that reads something like "Generic or unspecific search terms may result in unhelpful results" or something like that. |
@ndd7xv Ty SO much for doing this. I'm finally able to turn my attention to this PR. I am currently getting these errors in the console when running your branch locally: |
For context - how I'm building the site is From the /publishing directory
I am looking at the local build using Firefox. |
Interestingly, the search DOES work well in Chrome. It's possible I have a Firefox setting that is throwing it off. |
Aha! It also works fine in Firefox if I use localhost:8000 rather than 127.0.0.1:8000 - I see the connection here. Trying one more thing... |
Yep! It depends on what the I consider this good to merge! |
I unfortunately had to revert this merge due to some issues with our email generation process (which you had no way of knowing about, @ndd7xv, no worries at all! I still REALLY appreciate you doing this!) Details are in #4075, if anyone has ideas on how we might fix it or adapt our flow, let's capture them there :) |
Hey all! This search functionality is fantastic, and only required a small adjustment to get working with the email workflow. Follow-up can be found at #4076 |
Sorry that you had to revert this, I definitely should've tried testing out the newsletter stuff as well! I'll make a note for myself for the future :) Thanks @andrewpollack for the kind words and identifying a fix! In spite of being completely fine if this didn't get merged, I'm grateful that you were able to figure out what was wrong and create a PR 😄 |
Hello! Created a quick PR of a search for TWiR, though it comes with some caveats:
make clean
,make build
,make generate-website
andmake host-content
).SITEURL
inpelican.conf
to http://localhost:8000
. If I didn't, then locally running Pelican would have its hyperlinks reference https://this-week-in-rust.org, which wouldn't have the files that I added to make search work (likethemes/rusted/static/css/{stork-dark, stork}.css
andthemes/rusted/static/js
). Not sure of a better way/best practice to test my changes, but let me know if there is one.Given this, I understand if this isn't comprehensive enough to be merged, but I thought I'd make this for posterity's sake. Hopefully exact matching and more comprehensive search functionality is added when Stork Search 2.0 is released (its roadmap has 'Advanced query searches', but let me know if there's anything I can tweak or change!
Results:
