Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Releases: hashicorp/next-mdx-enhanced

5.0.0

28 Oct 22:41
7568c88
Compare
Choose a tag to compare

With this release, the .mdx-data folder has been moved to .next/cache/mdx-data. This change eliminates a number of issues that were happening with builds on vercel, and is one less folder you need to see/ignore in your project. I have marked this release as major because there are some recommended changes:

  • You can now delete the .mdx-data folder
  • You no longer need to add .mdx-data to your .gitignore
  • If you are making this change, you will want to inform contributors that they should also delete the .mdx-data folder, as it will potentially show up in a commit if its removed from .gitignore but still present locally
  • I'd recommend removing the .next folder and re-generating it after this change to make sure the upgrade goes smoothly

Commit Log

4.0.0

26 Aug 16:40
18d1945
Compare
Choose a tag to compare

⚠️ Warning ⚠️ This is a major release that is guaranteed to break your code unless you make some changes

High Level Updates

  • This plugin now works with next@9.5.x - sorry for the delay and thank you to everyone who helped get this update over the finish line!
  • There is now support for using a src folder with your next app
  • The way that layouts are structured is now significantly cleaner and a full closure can be removed

Migration Path

  • All layouts must remove their top level closure, frontmatter is now an argument passed directly to the inner layout function. For example, if you previously had the following layout:

    export default (frontMatter) => {
      return function Layout({ children }) {
        return (
          <>
            <h1>{frontMatter.title}</h1>
            {children}
          </>
        )
      }
    }

    ...your code can now be simplified as such:

    export default function Layout({ children, frontMatter }) {
      return (
        <>
          <h1>{frontMatter.title}</h1>
          {children}
        </>
      )
    }

    It's also worth noting that you must use a named function as your layout name, or you will have issues with fast refresh in next.js. This is generally true of all next.js pages, and is not specific to this plugin. Use named functions.

  • If you were exporting getStaticProps, getStaticPaths, and/or getServerSideProps on your layout file, you can still do this but it requires adding the reExportDataFetching option to the configuration. Without this option set to true, data fetching method exports will not work.

Credits

I am beyond thrilled by the widespread community effort to get this release out. Huge thanks to @44px, @LoriKarikari, @Ekrekr, @jemjam, @johnforte, and @keyz for helping! 💖

Commit Log

  • Update deps: 79969c1
  • Fix small typo in README: #69
  • Add missing curly brace to example in README: #70
  • Add note in readme where hooks should go in layout: #71
  • Add explicit re-exporting for data fetching functions from layouts: eed7835
  • Misc fixes: #77
  • Merge pull request #78 from hashicorp/je.re-export-data-fetching-fix: 3fe8a9d
  • Feat: added usesSrc or auto detects src folder for pages: fe5a536
  • Feat: added testing around new usessrc: 3769f13
  • Feat: moved pages dir into plugin options at load time: 2132f47
  • Fix: make sure docs page is pointing to src folder for pages.: c79d45e
  • Ci: cleaned up test variable name to be more verbose: 5f42861
  • Feat: added usesSrc to docs: 8421d21
  • Update dependencies: 09de8e0
  • Fix(next-compat): Update loader for Next 9.5.2: da9c967
  • Fix(tests): Update tests to work with new layouts: a62474c
  • Update example with named function: b9a9ad8
  • Fix a test: 17c425d
  • Update deps: 53db0ac

3.1.0

23 Jul 16:43
58b1bd4
Compare
Choose a tag to compare

This release adds a small upgrade to only run on markdown files within the pages directory, which should mean an improvement in performance.

Commit Log

  • Add prettier formatting scripts: 7f2adf8
  • Format with prettier: 0122d1c
  • Add husky: 0ac0021
  • Restrict frontmatter extraction to pages directory: #68
  • Release script name correction: c01c3a6

Credits

Huge thanks to @joshclow for helping!

3.0.0

15 May 21:43
5f2de7f
Compare
Choose a tag to compare

This release is fairly unlikely to break your app, but there were some major underlying configuration changes so it's marked as major out of an abundance of caution. This upgrade adds compatibility for next@9.4.0, which previously was not supported due to internal changes to the webpack loader structure.

We recommend being cautiously optimistic when running this upgrade ✨

2.5.0

23 Apr 23:17
38ef106
Compare
Choose a tag to compare

This release updates a few dependencies and adds support for exporting getStaticProps and getServerSideProps. Big thanks to @zephraph for the contribution!

Commit Log

  • Add support for exporting ssg hooks: dc472f5
  • Update version of mdx loader: 8295046
  • Merge pull request #40 from zephraph/support-next-ssg: 0984a65
  • Update README.md: 5485b74
  • Merge pull request #44 from joe-bell/patch-1: 2140a38
  • Bump next from 9.1.5 to 9.3.2: 8803311
  • Bump acorn from 5.7.3 to 5.7.4: 83870d6
  • Upgrade next and pair down example: a4d01c3
  • Update test process to just call build/export: 9b8e2b2
  • Remove stray console log: 960605b

v2.4.0

13 Jan 17:41
142161f
Compare
Choose a tag to compare

Enables overriding of the layout key in extendFrontMatter (aee4ea3) - thanks to @zephraph for this feature!

v2.3.0...v2.4.0

v2.3.0

12 Dec 19:15
20bf8ea
Compare
Choose a tag to compare

Changes

This release adds an extra parameter, frontMatter to the process function so that it can be used to modify frontmatter before it makes its way into your files. It also includes some housekeeping, dependency updates, and a major rewrite to the readme as well as several error corrections in the code samples.

Commit Log

  • update deps 526e496
  • update circle cache settings d3e2c6c
  • Include frontMatter in extendFrontMatter callback e9a5c0f
  • Fix tests by promisifying glob (#35) 22f48c9
  • further readme touchups b7d7791
  • Change processLayout to be an async func (#32) 4a23485
  • Rewrites the README for consistency and clarity (#30) 1df5563
  • Minor doc update to close jsx tag (#33) a4d4eae

v2.2.1...v2.3.0

Props

Major thanks to @leebyron, @zephraph, @jerolimov, and @burtlo for their work on this release!

v2.2.1

12 Nov 18:54
9007a98
Compare
Choose a tag to compare
  • Updated dependencies
  • Fixed a small bug with loader injection

v2.2.0

21 Oct 21:13
Compare
Choose a tag to compare

v2.1.1...v2.2.0

v2.1.1

03 Oct 04:55
237becb
Compare
Choose a tag to compare
  • fix bug with forcibly removing typescript support b3df23d

v2.1.0...v2.1.1