Skip to content

Function: orderByMeta()

ts
function orderByMeta(
   posts, 
   orderBy, 
   desc): Partial<PostFrontMatter>[];

Defined in: packages/valaxy/client/utils/time.ts:47

sort posts by date

Parameters

posts

Partial<PostFrontMatter>[]

orderBy

"date" | "updated"

desc

boolean = true

Returns

Partial<PostFrontMatter>[]