contentlayerdev / contentlayerdev/contentlayer

Consider renaming field option `default` to `fallback`

Open
#120 1 comment 2 reactions 0 assignees View on GitHub
meta: never-stale pkg/source-files
Dominant language
TypeScript
Stars
3.5k
Forks
192
PR merge metrics
No merged PRs in 30d

Description

I'm currently considering renaming the field option `default` to `fallback` within the `defineDocumentType` or `defineNestedType` definitions in `contentlayer/source-files`.

Reasoning:
The term `default` value is typically used when "creating" some kind of record - however, Contentlayer never creates any kind of records/documents but just transforms then. Therefore I'm arguing the term `fallback` is more appropriate when considering the **absence** of a value.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.