Blog Posts

Port Web Site to Azure SWA

HTTrack logo

Part of my move to Static Web Apps was to move some older sites. I hope to do some via Hugo, but the goal for now is to get off of the old Windows 2003 server which is serving ASP.net and even straight-up *.asp pages. The key is to use HTTrack to convert the sites to striaght HTML.

For my first try at this, I followed Microsoft’s quick start used the Azure extension in VS Code to create the static web app, but this does not allow you to specify the resource group. My preference is to create the SWA via Azure itself. The process below does not require the Azure extension in VS Code.

  • GitHub account
  • Azure subscription
  • Visual studio with Git and Powershell installed

Add Custom Subdomain to Azure Static Web App

create-cname

If you have an Azure Static Web App created and want to use a custom subdomain on a domain registered hosted outside of Azure, follow these steps. For example, here is how I created https://SPblog.bullseyeconsulting.com which may still be available as you read this post. Azure grants up to two custom domains per static web app including an SSL certificate which means the site works using the encrypted HTTPS protocol. It is very easy and very free, an amazing value. Prerequisites

  1. Azure Static Web Site hosted in your Azure account
  2. The ability to add a CNAME DNS record via your domain’s DNS server.

Create New Hugo Blog Site in Azure SWA

swa-no-content

Do you just love doing cool stuff? This post details the steps to create this blog using the Hugo static site generator hosted in Azure static web apps using Windows. The price is just your time and effort. The tools in the prerequisites are free.

  • GitHub account
  • Azure subscription
  • Hugo installed
    • From the link above, scroll to assets > Click Show all nn assets.
    • Use extended version recommended for modern themes, e.g, hugo_extended_0.115.1_windows-amd64.zip.
    • Unzip, rename the folder to hugo-amd64 and add the folder to c:\program files
    • Add %ProgramFiles%\hugo-amd64 folder to your path in system settings > environment variables.
    • I may make a blog post with these details.
  • Pick a Hugo theme. I use fuji for this post.
  • Visual studio with Git and Powershell installed

Welcome

Welcome to the blog, an extension of my old blog which you can see here. The legacy blog ran using WSS (Windows SharePoint Services) back when you could expose a public web site on SharePoint. I have scraped it to HTML and am retiring that dynamic site. Here, I can share my growing pains in the transition to using Hugo to create the content that I’m hosting on an Azure Static Web App including this site written with the Hugo Static Site Generator.