import{_ as s,o as a,c as l,V as n}from"./chunks/framework.b31a4d00.js";const h=JSON.parse('{"title":"HTML 模板","description":"","frontmatter":{},"headers":[],"relativePath":"guide/template.md"}'),o={name:"guide/template.md"},p=n(`

HTML 模板

Fes.js 默认模板内容是:

TIP

fes3.0+ html 模版文件从 public/index.html 挪到项目根目录。

html
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width,initial-scale=1.0" />
        <title><%= title %></title>
    </head>
    <body>
        <div id="<%= mountElementId %>"></div>
    </body>
</html>

修改页面标题

js
// .fes.js
export default {
    title: '这是页面标题',
};

页面的标题会设置成 这是页面标题

模板变量

模版中可以使用的变量:

举个 🌰 :

env
# .env
FES_APP_HELLO_WORLD=hello world
html
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<body>
    <div><%= FES_APP_HELLO_WORLD %></div>
</body>
`,13),t=[p];function e(c,r,D,F,y,i){return a(),l("div",null,t)}const u=s(o,[["render",e]]);export{h as __pageData,u as default};