summaryrefslogtreecommitdiff
path: root/examples/astro-markdown/src
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@matthewphillips.info> 2021-05-27 13:54:38 -0400
committerGravatar GitHub <noreply@github.com> 2021-05-27 13:54:38 -0400
commitdd7cc798e04897ece8b280f9145cfa6789e8501e (patch)
treedeca42114ab42c7202e24f66a07392edccf4bc89 /examples/astro-markdown/src
parent3dc141b86840963b8a313178419b2a36306098c9 (diff)
downloadastro-dd7cc798e04897ece8b280f9145cfa6789e8501e.tar.gz
astro-dd7cc798e04897ece8b280f9145cfa6789e8501e.tar.zst
astro-dd7cc798e04897ece8b280f9145cfa6789e8501e.zip
Fix codeblocks in markdown components (#264)
* Fix codeblocks in markdown components * Debugging * More debugging * remove extra debugging stuff
Diffstat (limited to 'examples/astro-markdown/src')
-rw-r--r--examples/astro-markdown/src/layouts/main.astro3
-rw-r--r--examples/astro-markdown/src/pages/index.astro12
-rw-r--r--examples/astro-markdown/src/pages/other.md18
3 files changed, 32 insertions, 1 deletions
diff --git a/examples/astro-markdown/src/layouts/main.astro b/examples/astro-markdown/src/layouts/main.astro
index bd7e96adf..61326cc5c 100644
--- a/examples/astro-markdown/src/layouts/main.astro
+++ b/examples/astro-markdown/src/layouts/main.astro
@@ -4,9 +4,10 @@ export let content;
<html>
<head>
+ <meta charset="utf-8">
<title>{content.title}</title>
+ <link rel="stylesheet" href="/styles/global.css">
</head>
-
<body>
<slot/>
</body>
diff --git a/examples/astro-markdown/src/pages/index.astro b/examples/astro-markdown/src/pages/index.astro
index e05db0155..b46f3698f 100644
--- a/examples/astro-markdown/src/pages/index.astro
+++ b/examples/astro-markdown/src/pages/index.astro
@@ -21,6 +21,8 @@ const items = ['A', 'B', 'C'];
The best part? It comes with all the Astro features you expect.
+ [Other example](./other)
+
## Embed framework components
<ReactCounter:visible />
@@ -40,5 +42,15 @@ const items = ['A', 'B', 'C'];
### Markdown can be embedded in any child component
</ReactCounter:visible>
+ ## Code
+
+ Should work!
+
+ ```js
+ import Something from './another';
+
+ const thing = new Something();
+ ```
+
</Markdown>
</Layout>
diff --git a/examples/astro-markdown/src/pages/other.md b/examples/astro-markdown/src/pages/other.md
new file mode 100644
index 000000000..2a059e3d1
--- /dev/null
+++ b/examples/astro-markdown/src/pages/other.md
@@ -0,0 +1,18 @@
+---
+title: Some Markdown Page
+layout: ../layouts/main.astro
+---
+
+# Code
+
+```js
+var foo = 'bar';
+
+function doSomething() {
+ return foo;
+}
+```
+
+# Paragraph
+
+text here. \ No newline at end of file