Repository navigation
Fix homepage search, broken anchors and slashless internal links - #27
Merged
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for suites-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Homepage search returns nothing
contextualSearchdefaults to true in Docusaurus, which filters results by thedocusaurus_tagfacet. The crawler config matcheshttps://suites.dev/docs/**only, so all 507 records carrydocusaurus_tag:docs-default-currentand none carries thedocusaurus_tag:defaultvalue the theme sends from/and othersrc/pagesroutes.Measured against the live index:
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: falseand 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.
types#mockedtypes/#mockedt(heading isMocked<T>)testbed-solitary#pre-compile-mock-configurationtestbed-solitary/#configuring-mocksinstallation#typescript-configurationinstallation/#setting-up-tsconfigjsontypes#unitreferenceunit-reference/, where UnitReference is documentedguides/fundamentals#solitary-testsguides/solitary/, matching the link text90 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 buildgoes from 5 broken-anchor warnings to 0 warnings. Bundle carriescontextualSearch:!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.