Add support to MDX in blog
This commit is contained in:
@ -43,7 +43,7 @@ const image = await findImage(post.image);
|
||||
<footer class="mt-4">
|
||||
<div>
|
||||
<span class="text-gray-500 dark:text-slate-400">
|
||||
<time datetime={post.pubDate}>{getFormattedDate(post.pubDate)}</time> ~
|
||||
<time datetime={post.publishDate}>{getFormattedDate(post.publishDate)}</time> ~
|
||||
{Math.ceil(post.readingTime)} min read
|
||||
</span>
|
||||
</div>
|
||||
|
@ -11,7 +11,7 @@ const { post } = Astro.props;
|
||||
<article>
|
||||
<header>
|
||||
<p class="max-w-3xl mx-auto text-center">
|
||||
<time datetime={post.pubDate}>{getFormattedDate(post.pubDate)}</time> ~ {Math.ceil(post.readingTime)} min read
|
||||
<time datetime={post.publishDate}>{getFormattedDate(post.publishDate)}</time> ~ {Math.ceil(post.readingTime)} min read
|
||||
</p>
|
||||
<h1
|
||||
class="px-4 sm:px-6 max-w-3xl mx-auto text-center text-4xl md:text-5xl font-bold leading-tighter tracking-tighter mb-8 font-heading"
|
||||
@ -34,7 +34,7 @@ const { post } = Astro.props;
|
||||
<div
|
||||
class="container mx-auto px-6 sm:px-6 max-w-3xl prose prose-lg lg:prose-xl dark:prose-invert dark:prose-headings:text-slate-300 prose-md prose-headings:font-heading prose-headings:leading-tighter prose-headings:tracking-tighter prose-headings:font-bold prose-a:text-primary-600 dark:prose-a:text-primary-400 prose-img:rounded-md prose-img:shadow-lg mt-8"
|
||||
>
|
||||
<Fragment set:html={post.body} />
|
||||
{post.Content ? <post.Content /> : <Fragment set:html={post.body} />}
|
||||
</div>
|
||||
<div class="container mx-auto px-8 sm:px-6 max-w-3xl mt-8">
|
||||
<PostTags tags={post.tags} />
|
||||
|
Reference in New Issue
Block a user