summaryrefslogtreecommitdiff
path: root/examples/with-mdx
diff options
context:
space:
mode:
Diffstat (limited to 'examples/with-mdx')
-rw-r--r--examples/with-mdx/astro.config.mjs5
-rw-r--r--examples/with-mdx/src/pages/index.mdx18
2 files changed, 9 insertions, 14 deletions
diff --git a/examples/with-mdx/astro.config.mjs b/examples/with-mdx/astro.config.mjs
index 57011d4ee..d797941ec 100644
--- a/examples/with-mdx/astro.config.mjs
+++ b/examples/with-mdx/astro.config.mjs
@@ -4,8 +4,5 @@ import preact from '@astrojs/preact';
// https://astro.build/config
export default defineConfig({
- integrations: [
- mdx(),
- preact()
- ]
+ integrations: [mdx(), preact()],
});
diff --git a/examples/with-mdx/src/pages/index.mdx b/examples/with-mdx/src/pages/index.mdx
index e541df27c..cbd392371 100644
--- a/examples/with-mdx/src/pages/index.mdx
+++ b/examples/with-mdx/src/pages/index.mdx
@@ -1,19 +1,17 @@
-import Counter from '../components/Counter.jsx'
-import Title from '../components/Title.astro'
-export const components = { h1: Title }
+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')
+ { 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>
+<Counter client:idle>## Counter</Counter>