diff options
author | 2021-07-15 14:13:35 -0400 | |
---|---|---|
committer | 2021-07-15 14:13:35 -0400 | |
commit | 166e22bdf35b9751dc42f5cc6cb27a99b077df93 (patch) | |
tree | e8643360c2250dda82ebf95b62281978547d5188 /docs/src/pages/reference/builtin-components.md | |
parent | fb8bf7ec43f7b09348c12d5ff9f81131c70ef5e9 (diff) | |
download | astro-166e22bdf35b9751dc42f5cc6cb27a99b077df93.tar.gz astro-166e22bdf35b9751dc42f5cc6cb27a99b077df93.tar.zst astro-166e22bdf35b9751dc42f5cc6cb27a99b077df93.zip |
merge in docs site (#705)
Diffstat (limited to 'docs/src/pages/reference/builtin-components.md')
-rw-r--r-- | docs/src/pages/reference/builtin-components.md | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/src/pages/reference/builtin-components.md b/docs/src/pages/reference/builtin-components.md new file mode 100644 index 000000000..109a5cba0 --- /dev/null +++ b/docs/src/pages/reference/builtin-components.md @@ -0,0 +1,32 @@ +--- +layout: ~/layouts/Main.astro +title: Built-In Components +--- + +Astro includes several builtin components for you to use in your projects. All builtin components are available via `import {} from 'astro/components';`. + +## `<Markdown />` + +```astro +--- +import { Markdown } from 'astro/components'; +--- +<Markdown> + # Markdown syntax is now supported! **Yay!** +</Markdown> +``` + +See our [Markdown Guide](/guides/markdown-content) for more info. +<!-- TODO: We should move some of the specific component info here. --> + + +## `<Prism />` + +```astro +--- +import { Prism } from 'astro/components'; +--- +<Prism code={`const foo = 'bar';`} /> +``` + +This component provides syntax highlighting for code blocks. Since this never changes in the client it makes sense to use an Astro component (it's equally reasonable to use a framework component for this kind of thing; Astro is server-only by default for all frameworks!). |