Skip to content

Commit

Permalink
chore: update MDX example
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Jul 1, 2022
1 parent 0d00091 commit 6803be1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion examples/with-mdx/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"recommendations": ["astro-build.astro-vscode"],
"recommendations": [
"astro-build.astro-vscode",
"silvenon.mdx"
],
"unwantedRecommendations": []
}
8 changes: 5 additions & 3 deletions examples/with-mdx/src/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ 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');

# Hello world!

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>
## This is a counter!
</Counter>

0 comments on commit 6803be1

Please sign in to comment.