diff options
author | 2021-08-29 13:39:39 -0300 | |
---|---|---|
committer | 2021-08-29 11:39:39 -0500 | |
commit | 3d73d7fbf246c5380b134ae72ff851c5252fd4d8 (patch) | |
tree | 7c73e7e54f60b142f3c15974c5ef52df6bc3e5fe /docs/src | |
parent | 9823f16f5195c78c86b29c622ede5b385154e943 (diff) | |
download | astro-3d73d7fbf246c5380b134ae72ff851c5252fd4d8.tar.gz astro-3d73d7fbf246c5380b134ae72ff851c5252fd4d8.tar.zst astro-3d73d7fbf246c5380b134ae72ff851c5252fd4d8.zip |
Include lang="xxxx" in Prism component example (#1264)
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/pages/reference/builtin-components.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/src/pages/reference/builtin-components.md b/docs/src/pages/reference/builtin-components.md index 9465a3428..31a174727 100644 --- a/docs/src/pages/reference/builtin-components.md +++ b/docs/src/pages/reference/builtin-components.md @@ -26,10 +26,12 @@ See our [Markdown Guide](/guides/markdown-content) for more info. --- import { Prism } from 'astro/components'; --- -<Prism code={`const foo = 'bar';`} /> +<Prism lang="js" 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!). +This component provides language-specific 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!). + +See the [list of languages supported by Prism](https://prismjs.com/#supported-languages) where you can find a language's corresponding alias. And, you can also display your Astro code blocks with lang="astro"! ## `<Debug />` |