-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Any Field Type #331
Labels
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Would love to see this implemented. |
Would the already existing |
This helped with solving the issue. Thanks a ton! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In contentlayer
2.7
, the string definition would work likeany
, after the upgrade to2.8
if the data is not a string an error is thrown. This is correct behavior, yet if you are not able to change the data source you are stuck using contentlayer2.7
.A good example would be a
yaml
config file with fieldsnull
,true
,some string
, etc.Even though, using
any
looks like introducing an anti-pattern. I think it has a viable use case.Similarly, the Add Union Field Type could solve this problem. Yet, it seems a bit harder to implement.
The text was updated successfully, but these errors were encountered: