Skip to main content

How To Assign Favicons in Multi-Site Setup

Summary

Assigning favicons in a multi-site configuration involves different steps depending on whether you are a themes client or not. The implementation of the favicon assignment is similar for both but requires forking the Output type for themes clients.

Procedure

  1. Implement Favicon Assignment:

    • Non-Themes Clients: Implement directly in the custom Output type.

    • Themes Clients: First, fork the default Output type, then proceed with the implementation.

    • Code to Insert: 

      <link
        rel="icon"
        type="image/png"
        href={deployment(`${contextPath}/resources/images/${arcSite}/favicon.ico`)}
      />
      
  2. Fetch ${arcSite} Variable:

    • Use useFusionContext to obtain the ${arcSite} variable: 

      import { useFusionContext } from "fusion:context";
      
  3. Set Up Directory Structure:

    • Align your directory structure with the ${arcSite} variable to ensure the correct favicon is referenced for each site.

More Information