diff --git a/docs/layout.md b/docs/layout.md index 208fe9e..99a2e81 100644 --- a/docs/layout.md +++ b/docs/layout.md @@ -2,7 +2,7 @@ ## Add a new layout -Take a new layout named `secondary` as an example to make the route starting with `seconday` use this layout. +Take a new layout named `secondary` as an example to make the route starting with `secondary` use this layout. 1. Add related configuration in `src/utils/config.js`. For details, please refer to [layouts](/configuration?id=layouts). @@ -11,11 +11,11 @@ Take a new layout named `secondary` as an example to make the route starting wit            {                name: 'primary',                include: [/.*/], -               exclude: [/(\/(en|zh))*\/login/, /(\/(en|zh))*\/seconday\/(.*)/], +               exclude: [/(\/(en|zh))*\/login/, /(\/(en|zh))*\/secondary\/(.*)/],            },            {                name: 'secondary', -               include: [/(\/(en|zh))*\/seconday\/(.*)/], +               include: [/(\/(en|zh))*\/secondary\/(.*)/],            },    ], ``` @@ -40,21 +40,21 @@ Take a new layout named `secondary` as an example to make the route starting wit    export default ({ children }) => {      Return (        
-         

Seconday

+         

Secondary

         {children}        
     )    } ``` -4. Add a `seconday/index.js` file to the `src/pages/` directory. +4. Add a `secondary/index.js` file to the `src/pages/` directory. ```javascript    import React from 'react'    export default ({ children }) => { -     Return
Seconday page Content
+     Return
Secondary page Content
   } ``` -5. Finally, start the development mode `npm run start`, open [http://localhost:7000/seconday/](http://localhost:7000/seconday/) and you will see the page for the `seconday` layout. +5. Finally, start the development mode `npm run start`, open [http://localhost:7000/secondary/](http://localhost:7000/secondary/) and you will see the page for the `secondary` layout.