summaryrefslogtreecommitdiff
path: root/examples/with-mdx/src/pages/index.mdx
diff options
context:
space:
mode:
Diffstat (limited to 'examples/with-mdx/src/pages/index.mdx')
-rw-r--r--examples/with-mdx/src/pages/index.mdx19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/with-mdx/src/pages/index.mdx b/examples/with-mdx/src/pages/index.mdx
new file mode 100644
index 000000000..e541df27c
--- /dev/null
+++ b/examples/with-mdx/src/pages/index.mdx
@@ -0,0 +1,19 @@
+import Counter from '../components/Counter.jsx'
+import Title from '../components/Title.astro'
+export const components = { h1: Title }
+
+# Hello world!
+
+export const authors = [
+ {name: 'Jane', email: 'hi@jane.com'},
+ {name: 'John', twitter: '@john2002'}
+]
+export const published = new Date('2022-02-01')
+
+Written by: {new Intl.ListFormat('en').format(authors.map(d => d.name))}.
+
+Published on: {new Intl.DateTimeFormat('en', {dateStyle: 'long'}).format(published)}.
+
+<Counter client:idle>
+## Counter
+</Counter>