Skip to content

Commit

Permalink
docs: add more information about defaultTitle (umijs#1498)
Browse files Browse the repository at this point in the history
  • Loading branch information
leftstick authored and sorrycc committed Nov 22, 2018
1 parent 069bd88 commit 0b88346
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/plugin/umi-plugin-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,7 @@ export default () => {
```

> `title/route configuration` must be at the top of the routing page component, otherwise it will be ignored by `umi`
#### customized document.ejs

If you defined `src/pages/document.ejs` by your own, please make sure the snippet `<title><%= context.title %></title>` is added, otherwise the `title.defaultTitle` will not be injected to the generated `index.html`
6 changes: 5 additions & 1 deletion docs/zh/plugin/umi-plugin-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,8 @@ export default () => {
}
```

> 在约定式路由里,注释必须写在文件头,否则将不被识别
> 在约定式路由里,注释必须写在文件头,否则将不被识别
#### 自定义模板document.ejs

如果你使用了自定的`src/pages/document.ejs`,你需要在里面加入`<title><%= context.title %></title>`,以确保`title.defaultTitle`能正常被注入到生成的`index.html`

0 comments on commit 0b88346

Please sign in to comment.