-
Notifications
You must be signed in to change notification settings - Fork 433
boosting with metadata #2575
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
base: main
Are you sure you want to change the base?
boosting with metadata #2575
Conversation
Signed-off-by: DanRoscigno <dan@roscigno.com>
✅ Deploy Preview for docsearch ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@kai687 thanks for your help working through this last year, i finally got around to submitting a PR to document this. |
|
Reviewers: I don't generally write JavaScript, so please let me know if I am not following best practices. |
Add extraction examples
remove blank lines
|
Hi @DanRoscigno , nice contribution. I totally agree we need a bigger section on boosting, too many people are unaware of it, so it absolutely needs more visibility and explanation. I was able to scan over the PR this afternoon but not dig too deeply on it. Two things jump out at me - the highlighting of the code seems to look fine for me in dark mode but not so much in light mode, not sure if I have something wrong on my end. The other thing is that I think this can be simplified by going this approach http://localhost:3000/docs/required-configuration/#introduce-global-information-as-meta-tags. Using slightly different meta tags should remove the need to have to modify the crawler. One down side to this approach is that IMO it is invisible and I could see easily confusing someone - "why do these results seem boosted when the crawler isn't doing anything special here?" I think it could be easy to miss. But we can potentially make that a separate section, as another way to accomplish the same result. Will revisit again early next week. |
|
Thanks James, I will have a look at the highlighting. This is probably a change to your CSS. Regarding the meta tags, if I am reading the doc correctly I could use: <meta name="docsearch:pageRank" content="100" />That would be wonderful. I see that the reactive docs use this. I will give it a go and update the PR with this method. Probably I will put two scenarios in there, I do have a non-standard field that I extract. |
|
Yes, exactly, https://dataclient.io/docs and https://resthooks.io/docs are some examples of this. I think it would be great to cover both approaches since some users will want to do one, or the other, for different potential reasons. But document whichever one(s) you want to do and I fill in the rest after the PR is merged. |
|
yup, I just finished testing |
|
@randombeeper can you approve the netlify build so I can see the CSS issue, as I cannot get the docs to build on my end. |
Signed-off-by: DanRoscigno <dan@roscigno.com>
|
Hi @DanRoscigno I think we got your docs working locally awhile back. Do you still want to try to finish this out? |
Yes, thanks James. On my cal for tomorrow! |
I am submitting this PR to help people (including me!) manage page boosting with DocSearch and the Algolia Crawler. As I do not write Javascript often using Cheerio is not easy for me, so I took good notes while I worked through this and would like to share them with others. I am very happy with the way this is working.