logo
  • Guide
  • Config
  • Plugin
  • API
  • Examples
  • Community
  • Modern.js 2.x Docs
  • English
    • 简体中文
    • English
    • Commands
      File Conventions
      src/
      App.tsx
      entry.ts
      entry.server.tsx
      modern.runtime.ts
      routes/
      *.[server|node].tsx
      api/
      lambda/*.ts
      server/
      modern.server.ts
      shared/
      config/
      html/
      favicon.*
      icon.*
      mock/
      public/
      upload/
      modern.config.ts
      Runtime
      Core
      createRoot
      render
      RuntimeContext
      Router
      router
      SSR
      NoSSR
      renderStreaming
      renderString
      createRequestHandler
      BFF
      useHonoContext
      Utility
      CSS-In-JS API
      Head
      loadable
      📝 Edit this page
      Previous pagehtml/Next pageicon.*

      #Favicon

      When there is a favicon.* file in the config directory at the root of the project, Modern.js will automatically set the file to the html.favicon configuration option for generating the favicon icon on the page:

      ./config
      └── favicon.ico

      After the build is completed, you can see the following tags automatically generated in HTML:

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

      #Order

      When setting up the favicon, Modern.js looks for files in the following order:

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