Skip to content

Releases: contentlayerdev/contentlayer

0.0.31

10 Nov 17:34
721c3d3
Compare
Choose a tag to compare

Changes

  • Fixes a TS type-level problem (e.g. Type 'DocumentType<"Blog">' is not assignable to type 'DocumentType<string>') (closes #33)
  • Fixes peer dependency warnings
  • Added more information to error logs

0.0.30

09 Nov 17:48
b4216cb
Compare
Choose a tag to compare
  • Fixes next-contentlayer regression bug (closes #32)

0.0.29

09 Nov 15:03
589aa04
Compare
Choose a tag to compare

Changes

  • Fix OpenTelemetry dependencies issue (closes #30)
  • next-contentlayer
    • Support new next.config.mjs ESM-style Next.js config file format
  • 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 _raw and _id) (closes #22)

0.0.28

08 Nov 12:22
27fc312
Compare
Choose a tag to compare

Main changes

  • Added preliminary Windows support (closes #7)

  • next-contentlayer now ships with full MDX support out of the box (using mdx-bundler under the hood - closes #5). This means you no longer need mdx-bundler as part of your package.json dependencies. Here is a simple example:

    import { useMDXComponent } from 'next-contentlayer/hooks'
    
    const DocPage: React.FC = ({ doc }) => {
      const MDXContent = useMDXComponent(doc.body.code)
  • contentlayer/source-files added timezone support for type: 'date' values. (closes #9)

    // ...
    export default makeSource({
      contentDirPath: 'content',
      documentTypes: [Doc],
      date: { timezone: 'America/New_York' },
    })

Note: [email protected] requires Next.js 12.x.

Other improvements

  • Allow esbuild 0.13.x in peerDependencies (esbuild is still an optional dependency)
  • Turned "effect-ts"-related packages into optional peer dependencies. (closes #6)
  • Bug fix: Calling the CLI with --clearCache no longer fails when no cache exists

0.0.27

08 Oct 09:15
b39e5cc
Compare
Choose a tag to compare

Changes

  • Better error handling of invalid markdown files (e.g. invalid frontmatter data)
    image

0.0.26

07 Oct 13:24
ccba238
Compare
Choose a tag to compare

Changes

  • Generated JavaScript files in .contentlayer now have the .mjs instead of the .js extension. This shouldn't change anything for you when importing from .contentlayer in your app (e.g. Next.js). However, if you're importing from a Node.js script, you need to supply the --experimental-json-modules Node CLI argument (see Node.js docs).