Skip to content

Commit

Permalink
Merge pull request #45 from carbonplan/katamartin/fix-fonts
Browse files Browse the repository at this point in the history
Set up assetPrefix for production fonts
  • Loading branch information
katamartin authored Dec 13, 2024
2 parents 7f82ed9 + b8e1185 commit 2b7578a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
options: { format: 'mdx' },
})

const isDev =
process.env.VERCEL_ENV === 'preview' || process.env.NODE_ENV === 'development'

module.exports = withMDX({
pageExtensions: ['js', 'jsx', 'tsx', 'md', 'mdx'],
assetPrefix: isDev ? '' : 'https://charts.docs.carbonplan.org',
})
14 changes: 7 additions & 7 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@carbonplan/charts": "^3.1.1",
"@carbonplan/components": "^12.6.1",
"@carbonplan/components": "^12.6.3",
"@carbonplan/layouts": "^4.1.0",
"@carbonplan/prism": "^2.0.0",
"@carbonplan/theme": "^8.1.0",
Expand Down

0 comments on commit 2b7578a

Please sign in to comment.