azureazure-web-app-serviceazure-blob-storagewiki

How to change Wiki JS favicon deployed in Azure Web App?


I have a Wiki JS container running in Azure Web App (followed this doc: https://docs.requarks.io/install/azurewebapp), and I want to change the favicon. I read that maybe I can overwrite the favicon mount in the Azure Web App configuration, but unfortunately that's not working for now. Here's what I did so far:

Azure Web App - Path mappings

Azure Web App - Path mappings

Azure Storage - Fileshare

Azure Storage - Fileshare

Wiki JS - Uploaded favicon

Wiki JS - Uploaded favicon


Solution

  • I found an easy workaround until this feature gets implemented in V3:

    1. Go to Administration > Theme
    2. In the Head HTML Injection field, paste the following code:
    3. Replace <YOUR_LINK> with the full link to your favicon, then click Apply.
    <script>
      document.querySelectorAll('link[rel=icon],link[rel=apple-touch-icon],link[rel=mask-icon],meta[name=msapplication-TileImage]').forEach(function(node) {
        node.setAttribute(node.hasAttribute("content")?'content':'href', '<YOUR_LINK>');
      });
    </script>