Skip to content

Commit

Permalink
derive NextJS languages from our lib/languages.js (github#30281)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe authored Aug 26, 2022
1 parent eba0d09 commit 9fe34e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import fs from 'fs'
import path from 'path'

import frontmatter from 'gray-matter'
import { languageKeys } from './lib/languages.js'

const homepage = path.posix.join(process.cwd(), 'content/index.md')
const { data } = frontmatter(fs.readFileSync(homepage, 'utf8'))
Expand All @@ -17,8 +18,7 @@ export default {
ignoreDuringBuilds: true,
},
i18n: {
// locales: Object.values(languages).map(({ code }) => code),
locales: ['en', 'cn', 'ja', 'es', 'pt'],
locales: languageKeys,
defaultLocale: 'en',
},
sassOptions: {
Expand Down

0 comments on commit 9fe34e7

Please sign in to comment.