Skip to content

Conversation

@pottekkat
Copy link
Contributor

@pottekkat pottekkat commented Aug 7, 2023

What does this PR change? What problem does it solve?

Adds a configurable limit to the number of search results returned. This limit can be configured in the site's configuration file.

Was the change discussed in an issue or in the Discussions before?

Not discussed.

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • I have verified that the code works as described/as intended.
  • This change adds a Social Icon which has a permissive license to use it.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.
  • This change updates the overridden internal templates from HUGO's repository.
Signed-off-by: Navendu Pottekkat <navendu@apache.org>
Copy link
Owner

@adityatelange adityatelange left a comment

Choose a reason for hiding this comment

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

Throws an error Cannot read properties of null (reading 'limit') when params.fuseOpts is not defined.

resulting into `Cannot read properties of null (reading 'limit')`
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@adityatelange adityatelange merged commit f7bd1ec into adityatelange:master Aug 12, 2023
@pottekkat pottekkat deleted the feat/limit-search/1 branch August 12, 2023 12:55
romainx pushed a commit to romainx/hugo-PaperMod that referenced this pull request Aug 30, 2023
* feat: add configurable limit to search results

Signed-off-by: Navendu Pottekkat <navendu@apache.org>

* Handle case where params.fuseOpts is not defined
resulting into `Cannot read properties of null (reading 'limit')`


Utilizes search options by fuse https://www.fusejs.io/api/methods.html#search 

The options:

limit (type: number): Denotes the max number of returned search results.

---------

Signed-off-by: Navendu Pottekkat <navendu@apache.org>
Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
zer0ttl pushed a commit to zer0ttl/hugo-PaperMod that referenced this pull request Jan 24, 2024
* feat: add configurable limit to search results

Signed-off-by: Navendu Pottekkat <navendu@apache.org>

* Handle case where params.fuseOpts is not defined
resulting into `Cannot read properties of null (reading 'limit')`


Utilizes search options by fuse https://www.fusejs.io/api/methods.html#search 

The options:

limit (type: number): Denotes the max number of returned search results.

---------

Signed-off-by: Navendu Pottekkat <navendu@apache.org>
Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
jdxgfty pushed a commit to jdxgfty/hugo-PaperMod that referenced this pull request Nov 3, 2024
* feat: add configurable limit to search results

Signed-off-by: Navendu Pottekkat <navendu@apache.org>

* Handle case where params.fuseOpts is not defined
resulting into `Cannot read properties of null (reading 'limit')`


Utilizes search options by fuse https://www.fusejs.io/api/methods.html#search 

The options:

limit (type: number): Denotes the max number of returned search results.

---------

Signed-off-by: Navendu Pottekkat <navendu@apache.org>
Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants