just noticed this url goes nowhere, does anyone ha...
# community-help
n
just noticed this url goes nowhere, does anyone have the updated link?
j
Will fix that comment
n
awesome thanks, sent you a DM here in slack but I already found my way mostly
will ask here if any more questions arise
👍 1
running the scraper now
j
I was just typing this out… We don’t have a migration guide for Docusaurus per se, because it’s just a “fresh new integration”, when you follow that step-by-step guide which you’re following
n
yep perfect
where do I access the features you showed of pinning and synonyms and such?
j
It’s under “Curation” on the left panel
n
oh right it was greyed out because I was still scrapping whoops
okay will take a look scrapping it’s getting there already
👍 1
okay how do I now replace the algolia search with the typesense search? I feel like I did here but I might be missing something else? https://github.com/thirdweb-dev/docs/pull/430/files#diff-a038096cbdea434999e1dce5ab497212f1fe18204dde1a027ce3bdd663261a2aR184-R207
sorry if it’s a noob question 😄
j
Yup that should be it
n
well for some reason it wasn’t, I’m still seeing the algolia search on my preview url
but no results 😄
which makes sense since I removed my algolia key and such
j
Is it showing up locally?
Another thing to try, is first turning off the Algolia search bar completely
Make sure that works as expected, without any errors
And then install the typesense theme
n
hmm
how do I do that?
j
Looks like just removing the
algolia
key from the docusaurus theme config might do it?
n
hmm seems like we have some config on top that might be it
seems like we had a custom component to show algolia that’s why it was showing
but after removing it, not sure how to get back to the default so typesense would show by default
(as you can see, I didn’t set this up initially)
j
Ok once you’ve removed it, does the search bar disappear locally?
n
yes
j
Ok cool
Now if you add the typesense specific config and theme, does it show up now?
n
didn’t remove it, do you want me uninstall the theme and add it again?
j
Did you restart the docusaurus dev server?
n
yeah
I think the problem is that we’re rendering a custom navbar
so that might be out of scope for you
j
Yeah, and also out of my docusaurus knowledge 😅
n
I’ll figure it out, will update 😄
👍 1
well now I have the search, just need to have the things I had in my navbar back
j
That was fast!
n
yeah just had to delete the component
basically because I had a SearchBar component, it was getting replaced
👍 1
okaaay all fixed
message has been deleted
🚀 1
now onto the fun stuff with personalization and setting the github action
my scrapper has been running for like 90 mins I feel like
oh just finished
any idea why some results instead of sending me to the page they sent me here? https://docs-git-ni-typesense-exploration.thirdweb-preview.com/#docusaurus-base-url-issue-banner-container
(see url)
j
Could tell me the search term that generates those URLs?
n
“ui components”
j
The first two links in the search results essentially point to the home page, and that tile doesn’t have any anchor / link to point the user to
n
ohh so that’s what it’s getting linked to
j
yup
I’d recommend excluding the home page from search results
n
yeah, did with base config first to start
how do I exclude homepage?
n
the config file is incredibly cumbersome
j
You want to use
stop_urls
n
so just
"stop_urls": [
"/tests", "/"
],
?
add the “/”
oh no\
that wont work
j
Might have to use regex to make sure it only matches the home page
https://typesense-community.slack.com/archives/C01P749MET0/p1675986651679499?thread_ts=1675979239.202479&cid=C01P749MET0 That’s because this line is set to
header h1
, but on that page there’s no dom element like that You want to change that to
article h1, header h1
n
that was exactly what I was looking at
also, does this look correct to you?
message has been deleted
in the hierarchy sense
what’s important is the “useContract() function”
and that’s hierarchy lvl2
(getting deep now in the config stuff)
j
In the Typesense Cloud dashboard, it by default searches only the first 3 fields. But in docsearch there’s a specific field priority order defined
So what you see in the actual docsearch UI will return results in that priority order, which will be different from what you see in the dashboard….
Unless of course you setup the dashboard to mimic those same settings used in docusaurus
n
not sure I follow
so my results in the cloud dashboard will differ to what I see in my site?
that’s what you’re saying right
j
correct
If you scroll to the bottom of the search page in the cloud dashboard, you’ll see the search settings used
Those are different from what the docusaurus-typesense plugin uses at runtime
n
right, and how do I sync them? I can do that with the preset thing you told me right?
j
Yup!
I would recommend starting out with the default config from the docsearch plugin. If you look at the network requests sent to Typesense in the browser’s dev console, you’ll see all the default values for all the search parameters
n
I feel like prioritizing lvl2 is what’s giving me best results
but that might be a problem with how stuff is set up in docusaurus?
j
You could try changing it and see what the impact is…
n
the title is an h2
when it should be an h1
sorry if I’m bothering you with my thoughts here
j
I’d recommend updating the markup if that’s an option
No worries!
n
hmm yeah that might be an option I need to check the autogeneration
okay let’s say I can’t do that (not sure yet)
if I say okay I want this
how do I set it up on docusaurus to be like this?
I create the preset
message has been deleted
j
n
do you have an example? I don’t see preset on any of the examples
also, is this scoped to everything or can I do only for certain url scopes like with the hieararchies?
j
This will be scoped to everything…
I don’t have an example unfortunately
n
do you think someone can get me one? 😄 not sure what the syntax is supposed to be
j
typesenseSearchParameters: {"preset": "lvl2-priority"}
n
okay nice awesome
thanks
👍 1