Hugo webapp does not render correctly on Azure

Armin Sproll 21 Reputation points
2022-04-12T05:33:06.97+00:00

Hi,

I have a website build with hugo that works correctly hosted by my provider

http://unit-5.de

I am trying to put this site on Azure as static webapp and have deployed it from Azure DevOps. I also tried static webapp in Azure container. Both with the same result, the site does not render correctly:

https://purple-desert-0986b2d03.1.azurestaticapps.net/

Any ideas what is wrong here?

Thanks,
Armin

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
851 questions
0 comments No comments
{count} votes

Accepted answer
  1. ajkuma 24,971 Reputation points Microsoft Employee
    2022-04-12T09:39:44.467+00:00

    @Armin Sproll ,

    If you view the source of your site on Azure, you can see that it is referencing the CSS files from your other site.

    Please review the source below. [screenshot below and I have also attached 192292-reviewcode notepad file]
    source view

    Because Azure Static Web Apps enforces HTTPS by default, your site is loaded securely and is accessing those CSS files which are only available over an insecure HTTP connection. The browser will not allow this.

    You should be able to fix this by changing the baseUrl in your Hugo configuration to the HTTPS URL of your static web app. https://gohugo.io/getting-started/configuration/#baseurl

    // cc: @Anthony Chu - MSFT

    192292-reviewcode.txt

    ---
    To benefit the community find the right answers, please do mark the post which was helpful by clicking on Accept Answer’ & ‘Up-Vote’.


0 additional answers

Sort by: Most helpful