Strapi plugin logo for Random Sort

Random Sort

Randomly sort list of results

Strapi plugin Random Sort

A Strapi plugin to randomly sort the data of a request.

Features

  • Randomly sort incoming data without the need of complex middleware
  • Simple configuration and works with any endpoint

Installation

To install this plugin, you need to add an NPM dependency to your Strapi application.

# Using Yarn
yarn add strapi-random-sort

# Or using NPM
npm install strapi-random-sort

Configuration

Add configuration to your config/plugins.js file.

1
2
3
4
5
6
7
8
module.exports = ({ env }) => ({
   // ...
  "random-sort": {
    enabled: true,
  },
  // ...

});

Usage

You can access the new random query parameter on any of your API calls.

Add a ?random=true as a query parameter

Example

http://localhost:1337/api/blogs?random=true

Install now

npm install strapi-random-sort

STATS

2 GitHub stars45 weekly downloads

Last updated

367 days ago

Strapi Version

4.4.0 and above

Author

github profile image for Muhammad Bilal
Muhammad Bilal

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.