0 comments on “Azure FED Files missing in Helix”

Azure FED Files missing in Helix

When deploying Sitecore to Azure if you come across an issue where your font files are marked as red in the chrome network tab (essentially they are not found), this may help.

Basically, you need to tell the web server to serve files with a particular extension.

In our case, the font files ending with the extension .woff were not getting picked up which results in a number of strange looking fonts around a deployed website.

The solution is to add this to your web.config:

<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension="woff" mimeType="application/font-woff" />
            <mimeMap fileExtension="woff2" mimeType="application/font-woff" /> 
         </staticContent>
    </system.webServer>
</configuration> 

This will tell the Azure web application to serve up files with the given extension as expected.

If you’re working with the Helix Architecture you might like to include this in your Foundation layer.

You could introduce it into a web.config.transform inside your Foundation assets project:

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <system.webServer xdt:Transform="InsertIfMissing">
      <staticContent xdt:Transform="InsertIfMissing">
          <mimeMap xdt:Transform="InsertIfMissing" xdt:Locator="Match(fileExtension)" fileExtension="woff" mimeType="application/font-woff" />
          <mimeMap xdt:Transform="InsertIfMissing" xdt:Locator="Match(fileExtension)" fileExtension="woff2" mimeType="application/font-woff" />
      </staticContent>
   </system.webServer>
</configuration>
0 comments on “Helix Development Settings and GIT”

Helix Development Settings and GIT

When you first start out working with the Helix architecture two files will standout as needing to be unique for each developer. Both of these file are part of the habitat example project that you can find here.

  • gulp-config.js (in the root of the project)
  • z.Website.DevSettings.config (\src\Project\Website\code\App_Config\Include\Project\)

These files contain directory locations that are probably going to be unique depending on how a team member sets up their projects.

The trick is that we want these files in git but we also don’t want the developer to check these files in again with there own settings each time.

The solution:

In the respective folders containing the files run the following git command in the cmd prompt:

git update-index --assume-unchanged

Your probably going to want to document this as one of the required setup steps after checking out the project from you git repository.


What if a developer ever needs to change this file and check it in again. They can reverse the process with:

git update-index --no-assume-unchanged