From f241cc786947fa0abe866b664dee58524844b5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Fri, 7 Apr 2023 14:43:10 +0200 Subject: [PATCH] docs: fix `pageRank` type (#1848) * docs: fix `pageRank` type * lint --- packages/website/docs/record-extractor.md | 6 ++---- packages/website/src/components/Home.js | 7 ++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/website/docs/record-extractor.md b/packages/website/docs/record-extractor.md index 4d1ae760..b82e2cbc 100644 --- a/packages/website/docs/record-extractor.md +++ b/packages/website/docs/record-extractor.md @@ -176,8 +176,6 @@ You can now use them to [filter your search in the frontend][16] ### Boost search results with `pageRank` -_[`pageRank`](#pagerank) used to be an **integer**, it is now a **string**_ - This parameter allow you to boost records built from the current `pathsToMatch`. Pages with highest [`pageRank`](#pagerank) will be returned before pages with a lower [`pageRank`](#pagerank). Note that you can pass any numeric value **as a string**, including negative values: ```js @@ -194,7 +192,7 @@ This parameter allow you to boost records built from the current `pathsToMatch`. lvl4: "article h5", lvl5: "article h6", content: "article p, article li", - pageRank: "30", + pageRank: 30, }, }); }, @@ -274,7 +272,7 @@ type Lvl0 = { ### `pageRank` -> `type: string` | **optional** +> `type: number` | **optional** See the [live example](#boost-search-results-with-pagerank) diff --git a/packages/website/src/components/Home.js b/packages/website/src/components/Home.js index ba5d66a6..35c9ac81 100644 --- a/packages/website/src/components/Home.js +++ b/packages/website/src/components/Home.js @@ -162,9 +162,10 @@ function Home() { Made for Developer docs

- Initially created to fulfill our own documentation needs, - DocSearch eventually became a community project for open source docs. - But, now it is available for any/all kinds of developer documentation. + Initially created to fulfill our own documentation + needs, DocSearch eventually became a community project + for open source docs. But, now it is available for + any/all kinds of developer documentation.