#Blank line beween YAML frontmatter and import statements
2 messages · Page 1 of 1 (latest)
Astro’s docs show imports written immediately after the closing frontmatter fence (---), with no blank line required. For example, MDX after conversion:
---layout: '../../layouts/BaseLayout.astro'
title: 'Migrating to MDX'
date: 2022-07-26
tags: ["markdown", "mdx", "astro"]
---
import ReactCounter from '../../components/ReactCounter.jsx'
Astro also only requires that imports appear at the top of the component script; it does not mention any need for a blank line. [Imports on top]