Releases: contentlayerdev/contentlayer
Releases · contentlayerdev/contentlayer
0.0.31
0.0.30
0.0.29
Changes
- Fix OpenTelemetry dependencies issue (closes #30)
next-contentlayer- Support new
next.config.mjsESM-style Next.js config file format
- Support new
contentlayer/source-files- Windows: Also use posix-style file paths (i.e. use
/instead of\as file path separator) for user-facing file paths (e.g. in_rawand_id) (closes #22)
- Windows: Also use posix-style file paths (i.e. use
0.0.28
Main changes
-
Added preliminary Windows support (closes #7)
-
next-contentlayernow ships with full MDX support out of the box (usingmdx-bundlerunder the hood - closes #5). This means you no longer needmdx-bundleras part of yourpackage.jsondependencies. Here is a simple example:import { useMDXComponent } from 'next-contentlayer/hooks' const DocPage: React.FC = ({ doc }) => { const MDXContent = useMDXComponent(doc.body.code)
-
contentlayer/source-filesadded timezone support fortype: 'date'values. (closes #9)// ... export default makeSource({ contentDirPath: 'content', documentTypes: [Doc], date: { timezone: 'America/New_York' }, })
Note:
next-contentlayer@0.0.28requires Next.js12.x.
Other improvements
- Allow esbuild 0.13.x in
peerDependencies(esbuildis still an optional dependency) - Turned "effect-ts"-related packages into optional peer dependencies. (closes #6)
- Bug fix: Calling the CLI with
--clearCacheno longer fails when no cache exists
0.0.27
0.0.26
Changes
- Generated JavaScript files in
.contentlayernow have the.mjsinstead of the.jsextension. This shouldn't change anything for you when importing from.contentlayerin your app (e.g. Next.js). However, if you're importing from a Node.js script, you need to supply the--experimental-json-modulesNode CLI argument (see Node.js docs).
