Update dependency contentlayer to v0.2.8#15
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
06ad1d1 to
36f7704
Compare
36f7704 to
4bf1b3a
Compare
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
4bf1b3a to
0e49131
Compare
0e49131 to
a1c2607
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.2.6->0.2.8Release Notes
contentlayerdev/contentlayer
v0.2.8Compare Source
ℹ️ [TLDR] 0.2.8 improves list fields, field validations and error handling, type safety, and monorepo support.
✨ Improved Monorepo Support
When accessing documents outside the directory that contains
contentlayer.config.ts, you can definecontentDirPathusing relative values. For example, consider a repo with the following directory structure:. ├── docs [NextJS docs site] └── components/ ├── component-1/ │ └── README.md ├── component-2/ │ └── README.md └── component-3/ └── README.mdYou can define define
contentDirPathindocs/contentlayer.config.tsas.., allowing access to markdown files in thecomponentsdirectory.You can then run
contentlayer builddirectly from the project subdirectory (docsin this example). See #295 for more details.Avoiding
INIT_CWDThis release also brings better support for various monorepo tooling — Lerna, Turborepo, NPM workspaces, etc. See #104 for details.
More
listField Types#87 identified an issue with validating
listfield values. These validations have been improved, along with additional types within list fields. For example, previously, numbers were not supported, but are now available.Type Safety for
dateValuesBeing that there is no concept of a date type in JSON, Contentlayer stores date values as strings. Previously, these values were assigned a
stringtype by Contentlayer's automatically-exported type definitions. Now the type is calledIsoDateTimeString. It is an alias tostring, but will make it easier to introduce type-safety for date fields in your projects.Other Improvements
v0.2.7Compare Source
ℹ️ [TLDR] 0.2.7 brings experimental support for an
imagefield when using files source.✨ (Experimental) Support for
imageField with Files SourceWhen using
source-filesas the content source, you can now use animagefield. This will process images that are colocated with your content files, resolving the image path to a rich object containing properties for the image file. This will also move the image into a path that will ensure the image is publicly available on your site.imageField Example (Files Source)Given a document type definition that specifies a
coverImagefield of typeimage:And a content file that references a colocated image file:
Contentlayer will produce the following for the
coverImageproperty within the document:Date Improvements
datevalues that include timezones work more consistently (see #9 for details, and thanks to @pard68 & @mshick for their contributions).This change removes the
date-fnslibrary in favor of the new Temporal API (via a polyfill).Other Improvements
resolveCwdwhen using the files content source to explicitly tell Contentlayer how to resolve the current working directory. This also changes the default resolution behavior. See #270 for the change, which closes #266. And thanks to @mshick for their contribution here.🐞 Bug Fixes
defineDocument. See #268 for details.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.