From 3cd1c2020bdf02dc0c2ec9ec551f7c861a310b6a Mon Sep 17 00:00:00 2001 From: AsyncBanana <58297401+AsyncBanana@users.noreply.github.com> Date: Mon, 18 Oct 2021 14:35:16 -0400 Subject: [PATCH] Added frontmatter example to docs example (#1567) --- examples/docs/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/examples/docs/README.md b/examples/docs/README.md index 26505fe434..83865d7825 100644 --- a/examples/docs/README.md +++ b/examples/docs/README.md @@ -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