Added frontmatter example to docs example (#1567)
This commit is contained in:
parent
8c739f9ed1
commit
3cd1c2020b
1 changed files with 17 additions and 0 deletions
|
@ -34,6 +34,7 @@ To deploy your site to production, check out our [Deploy an Astro Website](https
|
|||
|
||||
Welcome! Check out [our documentation](https://github.com/snowpackjs/astro) or jump into our [Discord server](https://astro.build/chat).
|
||||
|
||||
|
||||
## Customize This Theme
|
||||
|
||||
### Site metadata
|
||||
|
@ -55,6 +56,22 @@ This theme uses a "cool blue" accent color by default. To customize this for you
|
|||
+ --theme-accent: hsla(var(--color-red), 1); /* or: hsla(#FF0000, 1); */
|
||||
```
|
||||
|
||||
## Page metadata
|
||||
|
||||
Astro uses frontmatter in Markdown pages to choose layouts and pass properties to those layouts. If you are using the default layout, you can customize the page in many different ways to optimize SEO and other things. For example, you can use the `title` and `description` properties to set the document title, meta title, meta description, and Open Graph description.
|
||||
|
||||
```md
|
||||
---
|
||||
title: Example title
|
||||
description: Really cool docs example that uses Astro
|
||||
layout: ../../layouts/MainLayout.astro
|
||||
---
|
||||
|
||||
# Page content...
|
||||
```
|
||||
|
||||
For more SEO related properties, look at `src/components/HeadSEO.astro`
|
||||
|
||||
|
||||
### Sidebar navigation
|
||||
|
||||
|
|
Loading…
Reference in a new issue