Working with Layouts
Learn how to work with layouts to create a reusable, consistent base for the application’s pages.
We'll cover the following...
When working with multiple pages, it’s common practice to create a Layout
component to share styles and structure across different pages. In this lesson, we’ll take a look at how to achieve this with a component.
Using import aliases
In the following code widget, notice that we already have the home and contact pages created. However, instead of static HTML, we have a Layout
component with some content inside it.
/// <reference path="../.astro/types.d.ts" /> /// <reference types="astro/client" />
Astro project structure
...