Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve
<head>
docs reference (withastro#301)
This might deserve a section on another page like `/component-syntax`, but it's a start. "Just use `<head>`" doesn't convey that Astro doesn't duplicate `<head>` elements in child components of layouts in a way that `react-helmet` does It was a bit confusing wording wise equating the two, so I added a caveat. From what I understand, the current recommendation to add to `<head>` from a lower component is: ```astro // MainLayout.astro <HTML> <head> <title>tada this is my title in regular head</title> <slot name="head/> </head> <body> <main> <slot/> </main> </body> </html> ``` and then in `Component.astro` ```astro <Fragment slot="head"> <title>this is a different title now :D</title> </Fragment> ```
- Loading branch information