Skip to content

Commit aba1c96

Browse files
committed
feat: i18n
1 parent 8a99754 commit aba1c96

File tree

9 files changed

+20
-11
lines changed

9 files changed

+20
-11
lines changed

demo/components/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default function Header() {
2-
return <h1>header</h1>
2+
return <h1>Next Demo!</h1>
33
}

demo/next.config.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
module.exports = {
2+
// Configurable site features we support:
3+
// distDir: 'build',
24
generateBuildId: () => 'build-id',
3-
// Configurable site features to support:
4-
// i18n: {
5-
// defaultLocale: 'en',
6-
// locales: ['en', 'es', 'fr']
7-
// },
5+
i18n: {
6+
defaultLocale: 'en',
7+
locales: ['en', 'es', 'fr']
8+
},
9+
// trailingSlash: true,
10+
// Configurable site features _to_ support:
811
// basePath: '/docs',
9-
// distDir: 'build',
1012
}

demo/pages/404.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function Custom404() {
2+
return <h1>Custom 404 - Page Not Found</h1>
3+
}

demo/pages/500.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function Custom500() {
2+
return <h1>Custom 500 - Server-side error occurred</h1>
3+
}

demo/pages/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import Link from 'next/link'
2+
import dynamic from 'next/dynamic'
3+
const Header = dynamic(() => import(/* webpackChunkName: 'header' */ '../components/Header'), { ssr: true })
24

35
const Index = ({ shows }) => (
46
<div>
57
<img src="/next-on-netlify.png" alt="NextJS on Netlify Banner" style={{ maxWidth: '100%' }} />
8+
9+
<Header/>
610

711
<h1>NextJS on Netlify</h1>
812
<p>

demo/public/favicon.ico

-14.7 KB
Binary file not shown.

demo/public/next-on-netlify.png

37.3 KB
Loading

demo/public/vercel.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/helpers/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ exports.setIncludedFiles = ({ netlifyConfig, publish }) => {
119119
netlifyConfig.functions[functionName].included_files.push(
120120
`${publish}/server/**`,
121121
`${publish}/serverless/**`,
122+
`${publish}/static/**`,
122123
`${publish}/*.json`,
123124
`${publish}/BUILD_ID`,
124125
)

0 commit comments

Comments
 (0)