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
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`)} />
Fetch
${arcSite}
Variable:Use
useFusionContext
to obtain the${arcSite}
variable:import { useFusionContext } from "fusion:context";
Set Up Directory Structure:
Align your directory structure with the
${arcSite}
variable to ensure the correct favicon is referenced for each site.