-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(blog): add mdx support for testing
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Second post | ||
--- | ||
|
||
import Title from '@components/TestTitle.astro'; | ||
export const components = { h1: Title }; | ||
|
||
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)}. | ||
|
||
## Syntax highlighting | ||
|
||
We also support syntax highlighting in MDX out-of-the-box! This example uses our default [Shiki theme](https://github.com/shikijs/shiki). See the [MDX integration docs](https://docs.astro.build/en/guides/integrations-guide/mdx/#syntax-highlighting) for configuration options. | ||
|
||
```astro | ||
--- | ||
const weSupportAstro = true; | ||
--- | ||
<h1>Hey, what theme is that? Looks nice!</h1> | ||
``` |