From b5e5dcfed009a6db0c087c115679bcf587da7cdf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20Otterstr=C3=B6m?=
<35617441+MarcusOtter@users.noreply.github.com>
Date: Thu, 19 Aug 2021 01:45:35 +0200
Subject: [PATCH] [DOCS] Add more information about content.astro (markdown)
(#1148)
* Correct heading levels
* Add more info about content.astro
* Remove accidental heading
---
docs/src/pages/guides/markdown-content.md | 83 ++++++++++++-----------
1 file changed, 43 insertions(+), 40 deletions(-)
diff --git a/docs/src/pages/guides/markdown-content.md b/docs/src/pages/guides/markdown-content.md
index 220a7ea16..5286db44b 100644
--- a/docs/src/pages/guides/markdown-content.md
+++ b/docs/src/pages/guides/markdown-content.md
@@ -13,7 +13,7 @@ Also, Astro supports third-party plugins for Markdown. You can provide your plug
> **Note:** Enabling custom `remarkPlugins` or `rehypePlugins` removes Astro's built-in support for [GitHub-flavored Markdown](https://github.github.com/gfm/) support, [Footnotes](https://github.com/remarkjs/remark-footnotes) syntax, [Smartypants](https://github.com/silvenon/remark-smartypants), [Remark-slug](https://github.com/remarkjs/remark-slug). You must explicitly add these plugins to your `astro.config.mjs` file, if desired.
-## Add a Markdown plugin in Astro
+### Add a Markdown plugin in Astro
If you want to add a plugin, you need to install the npm package dependency in your project and then update the `markdownOptions.remarkPlugins` or `markdownOptions.rehypePlugins` depends on what plugin you want to have:
@@ -49,65 +49,68 @@ export default {
};
```
-### Markdown Pages
+## Markdown Pages
-Astro treats any `.md` files inside of the `/src/pages` directory as pages. These pages are processed as plain markdown files and do not support components. If you're looking to embed rich components in your markdown, take a look at the [Markdown Component](#astros-markdown-component) section.
-
-`layout`
-
-The only special Frontmatter key is `layout`, which defines the relative path to an `.astro` component which should wrap your Markdown content.
-
-`src/pages/index.md`
+Astro treats any `.md` files inside of the `/src/pages` directory as pages. These files can contain frontmatter, but are otherwise processed as plain markdown files and do not support components. If you're looking to embed rich components in your markdown, take a look at the [Markdown Component](#astros-markdown-component) section.
+### Layouts
+Markdown pages have a special frontmatter property for `layout`. This defines the relative path to an `.astro` component which should wrap your Markdown content, for example a [Layout](/core-concepts/layouts) component. All other frontmatter properties defined in your `.md` page will be exposed to the component as properties of the `content` prop. The rendered Markdown content is placed into the default `