├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── __tests__ ├── __snapshots__ │ └── babelPlugin.js.snap ├── babelPlugin.js ├── fixtures │ ├── babel │ │ ├── basic.js │ │ └── foo.mdx │ ├── basic │ │ ├── layouts │ │ │ └── docs-page.jsx │ │ ├── next.config.js │ │ └── pages │ │ │ ├── docs │ │ │ ├── advanced.mdx │ │ │ └── intro.mdx │ │ │ └── index.jsx │ ├── extend-frontmatter-async │ │ ├── layouts │ │ │ └── docs-page.jsx │ │ ├── next.config.js │ │ └── pages │ │ │ ├── docs │ │ │ ├── advanced.mdx │ │ │ └── intro.mdx │ │ │ └── index.jsx │ ├── extend-frontmatter │ │ ├── layouts │ │ │ └── docs-page.jsx │ │ ├── next.config.js │ │ └── pages │ │ │ ├── docs │ │ │ ├── advanced.mdx │ │ │ └── intro.mdx │ │ │ └── index.jsx │ ├── file-extensions │ │ ├── next.config.js │ │ └── pages │ │ │ ├── index.jsx │ │ │ ├── test.md │ │ │ └── test.mdx │ ├── layout-exports-ssg │ │ ├── layouts │ │ │ └── docs-page.jsx │ │ ├── next.config.js │ │ └── pages │ │ │ └── docs │ │ │ └── intro.mdx │ ├── layouts-path │ │ ├── next.config.js │ │ ├── pages │ │ │ ├── docs │ │ │ │ ├── advanced.mdx │ │ │ │ └── intro.mdx │ │ │ └── index.jsx │ │ └── snargles │ │ │ └── index.jsx │ ├── on-content │ │ ├── layouts │ │ │ └── docs-page.jsx │ │ ├── next.config-mock.js │ │ ├── next.config.js │ │ └── pages │ │ │ ├── docs │ │ │ ├── advanced.mdx │ │ │ └── intro.mdx │ │ │ └── index.jsx │ ├── scan-mdx-content │ │ ├── components │ │ │ └── Snargles.jsx │ │ ├── layouts │ │ │ └── docs-page.jsx │ │ ├── next.config.js │ │ ├── pages │ │ │ ├── docs │ │ │ │ ├── advanced.mdx │ │ │ │ └── intro.mdx │ │ │ └── index.jsx │ │ └── use-cases.md │ └── src-folder │ │ ├── layouts │ │ └── docs-page.jsx │ │ ├── next.config.js │ │ └── src │ │ └── pages │ │ ├── docs │ │ ├── advanced.mdx │ │ └── intro.mdx │ │ └── index.jsx └── integration.js ├── babel-plugin-extract-frontmatter.js ├── babel-plugins-detect-exports.js ├── index.js ├── loader.js ├── package.json ├── prettier.config.js ├── util.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/README.md -------------------------------------------------------------------------------- /__tests__/__snapshots__/babelPlugin.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/__snapshots__/babelPlugin.js.snap -------------------------------------------------------------------------------- /__tests__/babelPlugin.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/babelPlugin.js -------------------------------------------------------------------------------- /__tests__/fixtures/babel/basic.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/babel/basic.js -------------------------------------------------------------------------------- /__tests__/fixtures/babel/foo.mdx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /__tests__/fixtures/basic/layouts/docs-page.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/basic/layouts/docs-page.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/basic/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/basic/next.config.js -------------------------------------------------------------------------------- /__tests__/fixtures/basic/pages/docs/advanced.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/basic/pages/docs/advanced.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/basic/pages/docs/intro.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/basic/pages/docs/intro.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/basic/pages/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/basic/pages/index.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/extend-frontmatter-async/layouts/docs-page.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/extend-frontmatter-async/layouts/docs-page.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/extend-frontmatter-async/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/extend-frontmatter-async/next.config.js -------------------------------------------------------------------------------- /__tests__/fixtures/extend-frontmatter-async/pages/docs/advanced.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/extend-frontmatter-async/pages/docs/advanced.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/extend-frontmatter-async/pages/docs/intro.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/extend-frontmatter-async/pages/docs/intro.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/extend-frontmatter-async/pages/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/extend-frontmatter-async/pages/index.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/extend-frontmatter/layouts/docs-page.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/extend-frontmatter/layouts/docs-page.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/extend-frontmatter/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/extend-frontmatter/next.config.js -------------------------------------------------------------------------------- /__tests__/fixtures/extend-frontmatter/pages/docs/advanced.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/extend-frontmatter/pages/docs/advanced.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/extend-frontmatter/pages/docs/intro.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/extend-frontmatter/pages/docs/intro.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/extend-frontmatter/pages/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/extend-frontmatter/pages/index.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/file-extensions/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/file-extensions/next.config.js -------------------------------------------------------------------------------- /__tests__/fixtures/file-extensions/pages/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/file-extensions/pages/index.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/file-extensions/pages/test.md: -------------------------------------------------------------------------------- 1 | --- 2 | extension: '.md' 3 | --- 4 | 5 | hello world 6 | -------------------------------------------------------------------------------- /__tests__/fixtures/file-extensions/pages/test.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | extension: '.mdx' 3 | --- 4 | 5 | hello world two 6 | -------------------------------------------------------------------------------- /__tests__/fixtures/layout-exports-ssg/layouts/docs-page.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/layout-exports-ssg/layouts/docs-page.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/layout-exports-ssg/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/layout-exports-ssg/next.config.js -------------------------------------------------------------------------------- /__tests__/fixtures/layout-exports-ssg/pages/docs/intro.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/layout-exports-ssg/pages/docs/intro.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/layouts-path/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/layouts-path/next.config.js -------------------------------------------------------------------------------- /__tests__/fixtures/layouts-path/pages/docs/advanced.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/layouts-path/pages/docs/advanced.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/layouts-path/pages/docs/intro.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/layouts-path/pages/docs/intro.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/layouts-path/pages/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/layouts-path/pages/index.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/layouts-path/snargles/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/layouts-path/snargles/index.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/on-content/layouts/docs-page.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/on-content/layouts/docs-page.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/on-content/next.config-mock.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/on-content/next.config-mock.js -------------------------------------------------------------------------------- /__tests__/fixtures/on-content/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/on-content/next.config.js -------------------------------------------------------------------------------- /__tests__/fixtures/on-content/pages/docs/advanced.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/on-content/pages/docs/advanced.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/on-content/pages/docs/intro.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/on-content/pages/docs/intro.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/on-content/pages/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/on-content/pages/index.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/scan-mdx-content/components/Snargles.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/scan-mdx-content/components/Snargles.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/scan-mdx-content/layouts/docs-page.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/scan-mdx-content/layouts/docs-page.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/scan-mdx-content/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/scan-mdx-content/next.config.js -------------------------------------------------------------------------------- /__tests__/fixtures/scan-mdx-content/pages/docs/advanced.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/scan-mdx-content/pages/docs/advanced.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/scan-mdx-content/pages/docs/intro.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/scan-mdx-content/pages/docs/intro.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/scan-mdx-content/pages/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/scan-mdx-content/pages/index.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/scan-mdx-content/use-cases.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/scan-mdx-content/use-cases.md -------------------------------------------------------------------------------- /__tests__/fixtures/src-folder/layouts/docs-page.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/src-folder/layouts/docs-page.jsx -------------------------------------------------------------------------------- /__tests__/fixtures/src-folder/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/src-folder/next.config.js -------------------------------------------------------------------------------- /__tests__/fixtures/src-folder/src/pages/docs/advanced.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/src-folder/src/pages/docs/advanced.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/src-folder/src/pages/docs/intro.mdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/src-folder/src/pages/docs/intro.mdx -------------------------------------------------------------------------------- /__tests__/fixtures/src-folder/src/pages/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/fixtures/src-folder/src/pages/index.jsx -------------------------------------------------------------------------------- /__tests__/integration.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/__tests__/integration.js -------------------------------------------------------------------------------- /babel-plugin-extract-frontmatter.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/babel-plugin-extract-frontmatter.js -------------------------------------------------------------------------------- /babel-plugins-detect-exports.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/babel-plugins-detect-exports.js -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/index.js -------------------------------------------------------------------------------- /loader.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/loader.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/package.json -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/prettier.config.js -------------------------------------------------------------------------------- /util.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/util.js -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashicorp/next-mdx-enhanced/HEAD/yarn.lock --------------------------------------------------------------------------------