Skip to content
文档
生日彩蛋项目
开始修改文件
index.html

index.html 文件 指导修改

目录树位置:✅index.html 你的根目录下的 /index.html 文件

文件内容:

<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
    <!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="icon" href="%VITE_SITE_LOGO%" />
    <link rel="apple-touch-icon" href="%VITE_SITE_APPLE_LOGO%" />
    <link rel="bookmark" href="%VITE_SITE_APPLE_LOGO%" />
    <link
      rel="apple-touch-icon-precomposed"
      sizes="200x200"
      href="%VITE_SITE_APPLE_LOGO%"
    />
    <meta name="description" content="%VITE_SITE_DES%" />
    <meta name="keywords" content="%VITE_SITE_KEYWORDS%" />
    <meta name="author" content="%VITE_SITE_ANTHOR%" />
    <meta name="theme-color" content="#424242" />
    <title>%VITE_SITE_NAME%</title>
    <!-- HarmonyOS Sans -->
    <link
      rel="stylesheet"
      href="https://s1.hdslb.com/bfs/static/jinkela/long/font/regular.css"
    />
    <script>
      if (
        /*@cc_on!@*/ false ||
        (!!window.MSInputMethodContext && !!document.documentMode)
      )
        window.location.href =
          'https://support.dmeng.net/upgrade-your-browser.html?referrer=' +
          encodeURIComponent(window.location.href);
    </script>
  </head>
 
  <body>
    <!-- 主体内容 -->
    <div id="app"></div>
    <!-- noscript -->
    <noscript>
      <div style="text-align: center">请开启 JavaScript</div>
    </noscript>
    <script type="module" src="/src/main.js"></script>
  </body>
</html>

更改帮助:

标签或属性可以改为什么
<html lang="zh-CN">更改语言代码,如:<html lang="en">
<meta charset="UTF-8">更改字符集编码
<link rel="icon" href="...">站点图标链接,替换为自定义favicon路径
<link rel="apple-touch-icon" href="...">Apple触摸图标链接,替换为自定义Apple图标路径
<meta name="description" content="...">网页描述内容,替换为自定义站点描述文本
<meta name="keywords" content="...">页面关键词,替换为符合网站SEO的关键词列表
<meta name="author" content="...">网站作者信息,替换为实际作者或团队名称
<title>网页标题,替换为自定义的页面标题