Skip to content

Instantly share code, notes, and snippets.

View sarah11918's full-sized avatar

Sarah Rainsberger sarah11918

View GitHub Profile
@sarah11918
sarah11918 / Astro21Diff.md
Created November 21, 2021 17:35
Astro v0.21.0 - differences that aren't bugs/breaking changes

What's DIFFERENT (but not necessarily buggy/breaking) in Astro 0.21.0 ???

1. How to include a layout in .md files

Previously, front matter REQUIRED a layout property (e.g. layout: ../../layouts/MarkdownPostLayout.astro) Now, it's ALSO OK to include your layout as an import in "setup":

setup: |
  import Layout from '../../layouts/BlogPost.astro'
  import SomeOtherComponent from '../../components/SomeOtherComponent.astro'
title description
Sidebar Customization
Learn how to customize the sidebar of your documentation.

import FileTree from '../../../components/file-tree.astro'; import SidebarPreview from '../../../components/sidebar-preview.astro';

A well-organized sidebar is key to a good documentation as it is one of the main ways users will navigate your site. Starlight provides a complete set of options to customize your sidebar layout and content.