contentlayerdev / contentlayerdev/contentlayer

Provide more utility functions (pick, ...)

オープン
#24 コメント 3 件 リアクション 2 件 担当者 0 名 GitHub で見る
feature
主要言語
TypeScript
スター
3.5k
フォーク
192
PR マージ指標
30日以内にマージされた PR はありません

説明

There's a number of common utility functions which are useful in Contentlayer projects (e.g. a type-safe `pick` function) like below or [here](https://github.com/leerob/leerob.io/blob/6f4ddbb390ca513dab32ecc75ce6fc8b05b9902b/lib/utils.ts#L1):

image

We should provide these utility functions out of the box with Contentlayer. Candidates:

- `pick`: Type-safe function similar to TS `Pick` type
- A function that helps with getting the "next" and "previous" document (common in docs pages)
- A function that helps with sorting documents
- `findById`

If you'd like to see an other utility function added, please share your requests/ideas in the comments below. 🙏

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。