Skip to content

Fix homepage search, broken anchors and slashless internal links - #27

Merged
omermorad merged 3 commits into
masterfrom
fix/algolia-homepage-search
Nov 2, 2026
Merged

omermorad merged 3 commits into
masterfrom
fix/algolia-homepage-search

Conversation

@omermorad

Copy link
Copy Markdown
Contributor

Homepage search returns nothing

contextualSearch defaults to true in Docusaurus, which filters results by the docusaurus_tag facet. The crawler config matches https://suites.dev/docs/** only, so all 507 records carry docusaurus_tag:docs-default-current and none carries the docusaurus_tag:default value the theme sends from / and other src/pages routes.

Measured against the live index:

docusaurus_tag:docs-default-current  -> nbHits=138
docusaurus_tag:default               -> nbHits=0

The homepage is the most visited page on the site (145 of 528 pageviews in the last 30 days), and search from it was dead. One docs version and one language means contextual filtering has nothing to disambiguate, so this sets contextualSearch: false and every route queries the same index.

Five links pointed at headings that do not exist

All in See Also lists, all predating #26. Each landed the reader at the top of the target page rather than the named section.

was now
types#mocked types/#mockedt (heading is Mocked<T>)
testbed-solitary#pre-compile-mock-configuration testbed-solitary/#configuring-mocks
installation#typescript-configuration installation/#setting-up-tsconfigjson
types#unitreference unit-reference/, where UnitReference is documented
guides/fundamentals#solitary-tests guides/solitary/, matching the link text

90 internal links missing the trailing slash

#26 set trailingSlash: true, so Netlify redirects the no-slash form of every docs route. Each of these links cost a 301 on click. Mechanical rewrite, no link targets changed beyond the slash.

Verification

yarn build goes from 5 broken-anchor warnings to 0 warnings. Bundle carries contextualSearch:!1. Rendered links are slash-terminated.

Not included

The Algolia index has been frozen at 507 records since Oct 3, so pages #26 rewrote still have stale snippets. That needs a crawler re-run from the Algolia dashboard, not a repo change.

Contextual search filters by docusaurus_tag. The crawler config only
matches https://suites.dev/docs/**, so every record carries
docusaurus_tag:docs-default-current and none carries the
docusaurus_tag:default value the theme sends from the homepage and
other src/pages routes. Searching from those routes returned zero hits
against an index of 507 records.

The site has one docs version and one language, so contextual filtering
has nothing to disambiguate. Turning it off lets every route query the
same index.
Every one sat in a See Also list and landed the reader at the top of
the target page instead of the section the link text named.

- types#mocked -> types/#mockedt, the heading is `Mocked<T>`
- testbed-solitary#pre-compile-mock-configuration -> #configuring-mocks
- installation#typescript-configuration -> #setting-up-tsconfigjson
- types#unitreference -> the unit-reference page, which is where
  UnitReference is actually documented
- guides/fundamentals#solitary-tests -> the solitary guide, matching
  what the link text promises
PR #26 set trailingSlash: true, so Netlify now redirects the no-slash
form of every docs route. The 90 internal links still written without
the slash each cost a 301 on click.
@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs.suites.dev Error Error Nov 2, 2026 2:06pm UTC

@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for suites-dev ready!

Name Link
🔨 Latest commit b09d017
🔍 Latest deploy log https://app.netlify.com/projects/suites-dev/deploys/6ae8985cd1875b2c818f5c4c
😎 Deploy Preview https://deploy-preview-27--suites-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@omermorad
omermorad merged commit aa5c587 into master Nov 2, 2026
6 of 7 checks passed
@omermorad
omermorad deleted the fix/algolia-homepage-search branch November 2, 2026 14:08

This branch had an error being deployed

1 failed deployment
Preview — b09d0176 Deployed Nov 2, 2026 by vercel[bot]
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.

1 participant