At Corporation Pop, we like to be up to date with the latest web trends and tools that will help us produce quicker and better websites. We recently discovered a new static site builder called Astro.
What is Astro? you may ask. Ken Tsang, our Front End Developer explains.
Astro is straightforward but will need a few things setting up first.
- Node.js – 14.15.0 or higher
- a text editor of your choice
- command line terminal
Install the handy installation wizard either manually or using the CLI (command-line interface).
Once installed, you can use the command to start your project. It will open in a new browser window and look something like this.
Inside your project
Inside the Astro project, you will see the following:
- Public folder – files and assets that do not need to be processed during build, such as favicons and images.
- SRC folder – where pages, layouts, components, styles and Markdown are kept.
As with any other framework, you can play around with the site and start putting stuff together.
As you can see from the screenshot, you first have to import the components to the page. It can be either a static component or an interactive one. Then, to add them to the page structure, you will need to add them as shown.
Let’s dive deeper
Astro is still relatively new to the game, but it has gained some attraction in the world of web. It’s simple to use, easy to get started and suitable for all levels of developers. And with a growing community in their Discord channel, I can see this framework taking off and potentially being the go-to tool for Corporation Pop in the future.