File tree 3 files changed +15
-10
lines changed
3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = {
2
- async redirects ( ) {
3
- return [
4
- {
5
- source : '/' ,
6
- destination : '/docs' ,
7
- permanent : true ,
8
- } ,
9
- ] ;
10
- } ,
11
2
env : {
12
3
customKey : 'my-value' ,
13
4
} ,
Original file line number Diff line number Diff line change 5
5
"scripts" : {
6
6
"dev" : " yarn markdown:build && next dev -p 3010" ,
7
7
"build" : " yarn markdown:build && next build" ,
8
- "deploy" : " next build && next export && git add out/ && git commit -m \" Deploy gh-pages\" && git subtree push --prefix out origin gh-pages" ,
8
+ "deploy" : " next build && next export && touch out/.nojekyll && git add out/ && git commit -m \" Deploy gh-pages\" && git subtree push --prefix out origin gh-pages" ,
9
9
"start" : " next start" ,
10
10
"lint" : " next lint" ,
11
11
"markdown:build" : " ts-node --project ./node.tsconfig.json ./src/scripts/BuildMarkdownData.ts"
Original file line number Diff line number Diff line change
1
+ import React , { FC , useEffect } from 'react' ;
2
+ import Router from 'next/router' ;
3
+
4
+ const HomePage : FC = ( ) => {
5
+ useEffect ( ( ) => {
6
+ const { pathname } = Router ;
7
+ if ( pathname == '/' ) {
8
+ Router . push ( '/hello-nextjs' ) ;
9
+ }
10
+ } ) ;
11
+ return null ;
12
+ } ;
13
+
14
+ export default HomePage ;
You can’t perform that action at this time.
0 commit comments