Week 2, Day 1 of #30DaysOfSWA!!
In Week 1 we covered core concepts for Azure Static Web Apps - from development to API-enablement, security, configuraton and deployment.
Today, we kick off Week 2 with a focus on seeing SWA in action - using popular web development frameworks and static site generators to build and deploy different kinds of applications. We kick things off with a look at Astro - a modern static site generator with a BYOF ("Bring your own framework") approach.
What We'll Cover
- What is a static site generator?
- What is Astro?
- Build & Deploy a Personal Blog with Astro
- Exercise: Try the tutorial to deploy your personal blog!
Static Site Generators
The term "static site generators" (SSG) refers to tools that automatically build static webpages for you, populating a chosen template with your custom content or data. The code generation is transparent to you, making it possible for even non-developers to setup custom static websites quickly.
Static site generation is a growing trend for fast, flexible website creation. But it requires an external service to handle hosting and build/deploy workflows. This is where Azure Static Web Apps comes in! Check out the SWA documentation for tutorials featuring popular SSGs like Hugo, Jekyll and Gatsby. We'll explore some other examples later this week.
- Bring your own framework (React, Vue, Svelte, web components)
- Compose your website using that framework's UI components
Astro + SWA
In today's tutorial, we walk through the steps required to:
- create an astro-powered blog (using this template)
- test it locally using the Azure Static Web Apps CLI (
- deploy it using the Visual Studio Code Extenstion for SWA
The end result will look like this.
Here are the key links to know:
- Visit this page for the step-by-step tutorial.
- Check this repository for the source code (demo app template)
- See this site for the deployed version of the app.
Then check back tomorrow for a new usage example and tutorial - this time, with a focus on React - as we continue to explore Azure Static Web Apps in action!
Here are a couple of options to try, to get more hands-on experience:
- Clone the template project and follow the tutorial to build and deploy your personal blog.
- Visit the Astro Themes page and try using a different starter project, then deploying it to Azure Static Web Apps.
Check out these other tutorials using more traditional static site generators: