For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/apis/app/hooks/config/favicon.md.
  • 简体中文
  • Favicon

    当项目根目录的 config 目录下存在 favicon.* 文件时,Modern.js 会自动将该文件设置到 html.favicon 配置项中,用于生成页面的 favicon 图标:

    ./config
    └── favicon.ico

    构建完成后,可以看到 HTML 中自动生成了以下标签:

    <link rel="icon" href="/favicon.ico" />

    查找顺序

    在设置 app icon 时,Modern.js 会按以下顺序寻找文件:

    • favicon.png
    • favicon.jpg
    • favicon.jpeg
    • favicon.svg
    • favicon.ico