Skip to content
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

Fix categorisation of error reference pages for Algolia #2275

Merged
merged 1 commit into from Jan 3, 2023

Conversation

delucis
Copy link
Member

@delucis delucis commented Jan 3, 2023

What kind of changes does this PR include?

  • Changes to the docs site code

Description

Addresses some recent poor search results reported in #2042

We add a hidden element to pages that Algolia picks up and uses to extract that page’s category, e.g.

<span id="docsearch-lvl0" hidden>Learn</span>

Due to a bug in our category utility, we were categorising error reference pages as “Reference”. This PR fixes that so that these pages now contain:

<span id="docsearch-lvl0" hidden>Error Reference</span>

Will still need to reevaluate these search terms (getStaticPaths and slots are current known issues) once this is live to see if the “Error Reference” category needs demoting in Algolia’s crawler logic.

@netlify
Copy link

netlify bot commented Jan 3, 2023

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 275bc50
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/63b42138e6777800087572aa
😎 Deploy Preview https://deploy-preview-2275--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@Princesseuh Princesseuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense to me!

Copy link
Contributor

@aFuzzyBear aFuzzyBear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, 🤖

@aFuzzyBear
Copy link
Contributor

Think there is a missing link found by 🦛 lint checker, might need looked into...👀

@delucis
Copy link
Member Author

delucis commented Jan 3, 2023

Just a borked run. Re-running now.

@delucis delucis merged commit 011ade2 into main Jan 3, 2023
@delucis delucis deleted the chris/algolia-error-reference-categorisation branch January 3, 2023 12:50
@delucis delucis self-assigned this Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants