Skip to content

Commit

Permalink
Merge pull request #43 from carbonplan/update-docs
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
Shane98c authored Mar 14, 2024
2 parents 65c1720 + 5dff738 commit 7f82ed9
Show file tree
Hide file tree
Showing 4 changed files with 4,720 additions and 7,419 deletions.
5 changes: 2 additions & 3 deletions docs/components/section.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MDXProvider } from '@mdx-js/react'
import { Box } from 'theme-ui'
import * as carbonPlanCharts from '@carbonplan/charts'
import { LiveCode, Pre } from '@carbonplan/prism'
import { LiveCode } from '@carbonplan/prism'
import { NavSection } from '@carbonplan/layouts'
import { contents } from './contents'

Expand All @@ -19,15 +19,14 @@ const scope = {
}

const components = {
code: ({ ...props }) => (
pre: ({ ...props }) => (
<LiveCode
theme={'monochrome'}
transform={transform}
scope={scope}
{...props}
/>
),
pre: Pre,
}

const Section = ({ children, name }) => {
Expand Down
23 changes: 2 additions & 21 deletions docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
const path = require('path')
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
options: { format: 'mdx' },
})

module.exports = withMDX({
pageExtensions: ['js', 'jsx', 'mdx', 'md'],
webpack: (config, options) => {
if (options.isServer) {
config.externals = ['react', 'theme-ui', ...config.externals]
}
config.resolve.alias['react'] = path.resolve(
__dirname,
'.',
'node_modules',
'react'
)
config.resolve.alias['theme-ui'] = path.resolve(
__dirname,
'.',
'node_modules',
'theme-ui'
)
return config
},
pageExtensions: ['js', 'jsx', 'tsx', 'md', 'mdx'],
})
Loading

0 comments on commit 7f82ed9

Please sign in to comment.