contentlayerdev / contentlayerdev/contentlayer
Provide more utility functions (pick, ...)
- 主要语言
- 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):

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. 🙏
贡献指南
调研方向
未指定文件、测试或入口点。首先检查现有的 Contentlayer utility API 以及这里列出的候选函数,然后确定应接受哪些 utility 和行为。完成的标准是,已实现约定的 utility 集合,并覆盖其文档中说明的行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100