Create a new src/pages/document.ejs
,umi agrees that if this file exists, it will be used as the default template, for example:
<!doctype html><html><head><meta charset="utf-8" /><title>Your App</title></head><body><div id="root"></div></body></html>
To configure the title in umi, please check Configuration Title.
In the template, the variables provided by umi can be obtained through context. The context contains:
route
,routing information, valid when multiple static HTML needs to be packaged (that is, when exportStatic is configured)config
,user configuration informationsuch as:
<link rel="icon" type="image/x-icon" href="<%= context.config.publicPath %>favicon.png" />