summaryrefslogtreecommitdiff
path: root/examples/blog/src/pages/posts/index.md
diff options
context:
space:
mode:
authorGravatar Ian Bull <irbull@gmail.com> 2022-03-10 09:49:52 -0800
committerGravatar GitHub <noreply@github.com> 2022-03-10 11:49:52 -0600
commit55f007f30ab4f4f664e584d4cbe70859a273bb25 (patch)
tree170ff76bea54003acba3ac191c6eab1e382fb01b /examples/blog/src/pages/posts/index.md
parent5d7a92b563ce87a181459b0b1a549fa6c9dbd204 (diff)
downloadastro-55f007f30ab4f4f664e584d4cbe70859a273bb25.tar.gz
astro-55f007f30ab4f4f664e584d4cbe70859a273bb25.tar.zst
astro-55f007f30ab4f4f664e584d4cbe70859a273bb25.zip
Support Prism in the blog template example (#2622)
The Prism syntax highlighter failed to render properly when Astro was initialized with the blog template. This was because the Prism CSS conflicted with the default blog template. This change-set removes the Viewport Width from the `pre` transform as this property conflicted with the prism CSS. This change-set also includes Prism in the Blog Post layout and adds a small javascript example to the sample post.
Diffstat (limited to 'examples/blog/src/pages/posts/index.md')
-rw-r--r--examples/blog/src/pages/posts/index.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/blog/src/pages/posts/index.md b/examples/blog/src/pages/posts/index.md
index 949dfb866..e118d869d 100644
--- a/examples/blog/src/pages/posts/index.md
+++ b/examples/blog/src/pages/posts/index.md
@@ -14,3 +14,13 @@ description: Just a Hello World Post!
This is so cool!
Do variables work {frontmatter.value * 2}?
+
+```javascript
+// Example JavaScript
+
+const x = 7;
+function returnSeven() {
+ return x;
+}
+
+```