Pagefind’s JavaScript API supports sorting your content when searching. Doing so will override the default rankings, and will return all matching results sorted by the given attribute.